This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (85 loc) · 2.92 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Check
on:
push:
branches-ignore: ["main"]
jobs:
check-package-loads:
strategy:
fail-fast: false
matrix:
adapter: ["bigquery", "snowflake"]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.2.0
- name: Cache poetry virtualenvs
uses: actions/cache@v3
with:
path: /home/runner/.cache/pypoetry/virtualenvs
key: poetry-venvs-no-dev-${{ runner.os }}-3.8-${{ matrix.adapter }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-vevns-no-dev-${{ runner.os }}-3.8-${{ matrix.adapter }}-
- name: Check package loads without dev dependencies
run: make check-package-loads ADAPTER=${{ matrix.adapter }}
check:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.2.0
- name: Cache poetry virtualenvs
uses: actions/cache@v3
with:
path: /home/runner/.cache/pypoetry/virtualenvs
key: poetry-venvs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-venvs-${{ runner.os }}-${{ matrix.python-version }}-
- name: Run check
run: make check
e2e-test:
strategy:
fail-fast: false
matrix:
adapter: ["bigquery", "snowflake"]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: git fetch origin ${{ github.event.pull_request.base.sha }}
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.2.0
- name: Cache poetry virtualenvs
uses: actions/cache@v3
with:
path: /home/runner/.cache/pypoetry/virtualenvs
key: poetry-venvs-${{ runner.os }}-3.8-${{ matrix.adapter }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-venvs-${{ runner.os }}-3.8-${{ matrix.adapter }}-
- name: Fail fast if on a fork as forks cannot run e2e-tests directly
if: |
github.event.pull_request.head.repo.full_name != github.repository &&
steps.changed-files.outputs.any_changed == 'true'
run: |
exit 1
- name: Run e2e tests
run: |
make e2e-test EXTRAS=${{ matrix.adapter }} ADAPTER=${{ matrix.adapter }}
env:
BIGQUERY_CREDENTIALS: ${{secrets.BIGQUERY_CREDENTIALS}}
SNOWFLAKE_CREDENTIALS: ${{secrets.SNOWFLAKE_CREDENTIALS}}