-
Notifications
You must be signed in to change notification settings - Fork 50
74 lines (61 loc) · 1.79 KB
/
tests.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
name: Tests
on:
push:
pull_request:
jobs:
tests:
name: Run tests (Python ${{matrix.python}}, Airflow ${{matrix.airflow}})
strategy:
matrix:
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
airflow:
- "2.10.0"
runs-on: ubuntu-latest
env:
AIRFLOW_HOME: ./scripts/airflow
AIRFLOW_VERSION: ${{ matrix.airflow }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ matrix.python }}-airflow-${{ matrix.airflow }}-pip-${{ hashFiles('**/requirements*.txt') }}-git-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python }}-airflow-${{ matrix.airflow }}-pip-${{ hashFiles('**/requirements*.txt') }}
${{ runner.os }}-python-${{ matrix.python }}-airflow-${{ matrix.airflow }}-pip-
${{ runner.os }}-python-${{ matrix.python }}-
${{ runner.os }}-python
${{ runner.os }}-
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install pytest
- name: Install environment
run: |
bash ./scripts/prepare.sh
bash ./scripts/install.sh
pip freeze
- name: Run tests
run: |
source ./scripts/config.sh
git config --global user.email "dev@example.com"
git config --global user.name "Test"
pytest tests
all_done:
name: Tests done
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: All done
run: echo 1