generated from theeldermillenial/python-template
-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (47 loc) · 1.33 KB
/
test.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
name: Tests
on:
workflow_dispatch: {}
push:
branches:
- main
# - dev
pull_request_target:
branches:
- main
- dev
jobs:
unit_tests:
name: unit-tests ${{ matrix.python-version }}
runs-on: ubuntu-latest
environment: production
strategy:
fail-fast: false
max-parallel: 1
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install nox
run: |
pipx install nox
- name: Run tests with nox
env:
DBSYNC_USER: ${{ secrets.DBSYNC_USER }}
DBSYNC_PASS: ${{ secrets.DBSYNC_PASS }}
DBSYNC_HOST: ${{ secrets.DBSYNC_HOST }}
DBSYNC_PORT: ${{ secrets.DBSYNC_PORT }}
DBSYNC_DB_NAME: ${{ secrets.DBSYNC_DB_NAME }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
NETWORK: ${{ secrets.NETWORK }}
WALLET_MNEMONIC: ${{ secrets.WALLET_MNEMONIC }}
AXO_API_KEY: ${{ secrets.AXO_API_KEY }}
run: |
nox --reuse-venv=yes --session tests --python ${{ matrix.python-version }}