Added CORS_ORIGINS #314
Workflow file for this run
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build-fastapi: | |
name: FastAPI CI | |
runs-on: ubuntu-latest | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
TEST_DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }} | |
ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} | |
RESET_PASSWORD_SECRET_KEY: ${{ secrets.RESET_PASSWORD_SECRET_KEY }} | |
VERIFICATION_SECRET_KEY: ${{ secrets.VERIFICATION_SECRET_KEY }} | |
CORS_ORIGINS: ${{ secrets.CORS_ORIGINS }} | |
services: | |
postgres: | |
image: postgres:17 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: testdatabase | |
ports: | |
- 5433:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Poetry with pip | |
run: pip install poetry | |
- name: Configure Poetry | |
working-directory: ./fastapi_backend | |
run: poetry config virtualenvs.create false | |
- name: Install dependencies | |
working-directory: ./fastapi_backend | |
run: poetry install | |
- name: Run tests | |
working-directory: ./fastapi_backend | |
run: poetry run coverage run -m pytest | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: python-coverage | |
parallel: true | |
build-frontend: | |
name: Next.js CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install Node dependencies | |
working-directory: ./nextjs-frontend | |
run: pnpm install | |
- name: Run tests | |
working-directory: ./nextjs-frontend | |
run: pnpm run coverage | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: node-coverage | |
parallel: true | |
finish: | |
name: Coveralls | |
needs: [ build-fastapi, build-frontend ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Close parallel build | |
uses: coverallsapp/[email protected] | |
with: | |
parallel-finished: true | |
carryforward: "python-coverage,node-coverage" |