-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (74 loc) · 2.52 KB
/
test_integration.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
# This workflow will install Python dependencies and run tests with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test Integration
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
jobs:
test:
strategy:
max-parallel: 1
matrix:
os: [
ubuntu-latest,
# windows-latest,
macos-latest,
]
python-version: [3.11]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
environment: ${{ github.base_ref }}
steps:
#----------------------------------------------
# ----------- check-out repo ------------
#----------------------------------------------
- uses: actions/checkout@v4
#----------------------------------------------
# ------------ setup python -----------
#----------------------------------------------
- name: 🔧 Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: 📜 Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------
# ----- load cached venv -----
#----------------------------------
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# ------------ install deps ------------
#----------------------------------------------
- name: Install dependencies
run: |
poetry install --no-interaction
#-----------------------------------------------
# ------------- run test suite ------------
#-----------------------------------------------
- name: 🧪 Run tests
if: always()
env:
CREDENTIALS_JSON: ${{ secrets.PYTEST_CREDENTIALS }}
run: |
source $VENV
echo $CREDENTIALS_JSON | base64 -d > ./tests/test_creds.json
make test