🔀 Merge pull request #218 from ezeparziale/… #865
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: Testing | |
on: [push, pull_request] | |
jobs: | |
testing: | |
environment: | |
name: test | |
env: | |
ACCESS_TOKEN_EXPIRE_MINUTES: ${{secrets.ACCESS_TOKEN_EXPIRE_MINUTES}} | |
ALGORITHM: ${{secrets.ALGORITHM}} | |
BACKEND_CORS_ORIGINS: ${{secrets.BACKEND_CORS_ORIGINS}} | |
GOOGLE_CLIENT_ID: ${{secrets.GOOGLE_CLIENT_ID}} | |
GOOGLE_CLIENT_SECRET: ${{secrets.GOOGLE_CLIENT_SECRET}} | |
POSTGRES_DB: ${{secrets.POSTGRES_DB}} | |
POSTGRES_HOSTNAME: ${{secrets.POSTGRES_HOSTNAME}} | |
POSTGRES_PASSWORD: ${{secrets.POSTGRES_PASSWORD}} | |
POSTGRES_PORT: ${{secrets.POSTGRES_PORT}} | |
POSTGRES_USER: ${{secrets.POSTGRES_USER}} | |
SECRET_KEY: ${{secrets.SECRET_KEY}} | |
services: | |
postgres: | |
image: postgres:16.0 | |
env: | |
POSTGRES_USER: ${{secrets.POSTGRES_USER}} | |
POSTGRES_PASSWORD: ${{secrets.POSTGRES_PASSWORD}} | |
POSTGRES_DB: ${{secrets.POSTGRES_DB}} | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pulling git repo | |
uses: actions/checkout@v2 | |
- name: Install python version 3.12 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.12" | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install all dependencies | |
run: pip install -r requirements.txt | |
- name: Test with pytest | |
run: | | |
pip install pytest coverage[toml] | |
bash scripts/coverage.sh |