added purge for source (#6) #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests & Deploy | |
on: [push] | |
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 |