-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (66 loc) · 1.99 KB
/
python-package.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
name: Test Python package
on:
push:
paths:
- 'utils/deltares_datasuite/**'
- '.github/workflows/**'
permissions:
contents: read
issues: read
checks: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
defaults:
run:
working-directory: ./utils/deltares_datasuite
env:
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/remix'
SESSION_SECRET: super-duper-s3cret
NODE_VERSION: 18
PYTHON_VERSION: 3.9
POETRY_VERSION: 1.6.1
AZURE_TENANT_ID: ${{ vars.ARM_TENANT_ID }}
AZURE_CLIENT_ID: ${{ vars.AZURE_APP_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_APP_CLIENT_SECRET }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: make poetry-download
- name: Set up cache
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run style checks
run: |
make check-codestyle
# - name: Run webserver and db container
# working-directory: .
# run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait --quiet-pull
- name: Run tests
run: |
make test
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/test-results.xml
**/test-results/**/*.xml
**/test-results/**/*.json
- name: Run safety checks
run: |
make check-safety