Feat/auth flow #253
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: Build and Test | |
on: | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
env: | |
python_version: '3.10' | |
java_version: '11' # needed by setup-openapi-generator.sh | |
local_postgres_db: postgres_db | |
local_postgres_user: postgres_user | |
local_postgres_pwd: postgres_password | |
local_postgres_port: 5432 | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
name: Build & Test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{ env.java_version }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ env.java_version }} | |
distribution: 'temurin' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.python_version }} | |
- name: Update .env file | |
run: | | |
echo "POSTGRES_USER=${{ env.local_postgres_user }}" > config/.env.local | |
echo "PGUSER=${{ env.local_postgres_user }}" >> config/.env.local | |
echo "POSTGRES_PASSWORD=${{ env.local_postgres_pwd }}" >> config/.env.local | |
echo "POSTGRES_DB=${{ env.local_postgres_db }}" >> config/.env.local | |
echo "POSTGRES_PORT=${{ env.local_postgres_port }}" >> config/.env.local | |
echo "POSTGRES_HOST=localhost" >> config/.env.local | |
echo "ENV=dev" >> config/.env.local | |
- name: Docker Compose DB/Liquibase for db-gen.sh | |
run: docker-compose --env-file ./config/.env.local up -d liquibase | |
working-directory: ${{ github.workspace }} | |
- name: Generate DB code | |
run: | | |
scripts/db-gen.sh | |
- name: Generate API code | |
run: | | |
scripts/setup-openapi-generator.sh | |
scripts/api-gen.sh | |
- name: Run lint checks | |
run: | | |
scripts/lint-tests.sh | |
# Uncomment the unit tests when tests are ready | |
# - name: Run unit tests | |
# run: | | |
# scripts/api-test.sh |