[pre-commit.ci] pre-commit autoupdate #140
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: tests | |
on: | |
pull_request: | |
push: | |
branches: [2.x/main, 2.x/develop] | |
permissions: | |
contents: read | |
jobs: | |
costy: | |
runs-on: ubuntu-latest | |
env: | |
TEST_MONOBANK_TOKEN: ${{ secrets.TEST_MONOBANK_TOKEN }} | |
TEST_DB_URL: ${{ vars.TEST_DB_URL }} | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: costy_test | |
ports: ['5432:5432'] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Setup just | |
uses: extractions/setup-just@v2 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install dependencies | |
run: just install-ci costy | |
- name: Prepend custom path | |
run: echo "/.venv/bin" >> $GITHUB_PATH | |
- name: Test with pytest | |
run: just ci-tests costy | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: AndrewSergienko/costy | |
files: .coverage | |
flags: costy | |
auth: | |
runs-on: ubuntu-latest | |
env: | |
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} | |
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }} | |
AUTH0_AUDIENCE: ${{ vars.AUTH0_AUDIENCE }} | |
AUTH0_AUTHORIZE_URL: ${{ vars.AUTH0_AUTHORIZE_URL }} | |
AUTH0_CONNECTION: ${{ vars.AUTH0_CONNECTION }} | |
AUTH0_ISSUER: ${{ vars.AUTH0_ISSUER }} | |
AUTH0_JWKS_URI: ${{ vars.AUTH0_JWKS_URI }} | |
AUTH0_REGISTER_URL: ${{ vars.AUTH0_REGISTER_URL }} | |
TEST_AUTH_PASSWORD: ${{ secrets.TEST_AUTH_PASSWORD }} | |
TEST_AUTH_USER: ${{ secrets.TEST_AUTH_USER }} | |
TEST_AUTH_USER_SUB: ${{ secrets.TEST_AUTH_USER_SUB }} | |
TEST_DB_URL: ${{ vars.TEST_DB_URL }} | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: costy_test | |
ports: ['5432:5432'] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Setup just | |
uses: extractions/setup-just@v2 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install dependencies | |
run: just install-ci auth | |
- name: Prepend custom path | |
run: echo "/.venv/bin" >> $GITHUB_PATH | |
- name: Test with pytest | |
run: just ci-tests auth | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: AndrewSergienko/costy | |
files: .coverage | |
flags: auth |