-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.09 KB
/
python-app.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
name: Run Tests & Deploy
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install poetry && poetry config virtualenvs.create false
python -m venv /opt/venv
poetry install --no-interaction --no-root
- name: Install packages needed for CI
run: pip install pre-commit pytest
- name: Lint all files
run: pre-commit run --all-files --show-diff-on-failure
- name: Run tests
env:
SOURCE_API_BASE: ${{secrets.SOURCE_API_BASE}}
SOURCE_USERNAME: ${{secrets.SOURCE_USERNAME}}
SOURCE_PASSWORD: ${{secrets.SOURCE_PASSWORD}}
TARGET_API_BASE: ${{secrets.TARGET_API_BASE}}
TARGET_USERNAME: ${{secrets.TARGET_USERNAME}}
TARGET_PASSWORD: ${{secrets.TARGET_PASSWORD}}
run: pytest tests