tests continued #46
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: [pull_request, push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-22.04 | |
env: | |
BASE_URL: http://localhost:5000 | |
DB_NAME: temp_database | |
DB_USER: temp_username | |
DB_PASSWORD: temp_password | |
DB_HOST: kanban_database | |
POSTGRES_USER: temp_username | |
POSTGRES_PASSWORD: temp_password | |
POSTGRES_DB: temp_database | |
steps: | |
- uses: actions/checkout@v2 | |
# Cache Cypress binary | |
- name: Cache Cypress binary | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/Cypress | |
key: ${{ runner.os }}-cypress-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-cypress- | |
# Set up Docker Compose | |
- name: Set up Docker Compose | |
run: docker compose -f docker-compose.prod.yml up --build -d | |
# Install Cypress Binary | |
- name: Install Cypress Binary | |
working-directory: ./e2e | |
run: npx cypress install | |
# Install Cypress Dependencies | |
- name: Install Cypress Dependencies | |
working-directory: ./e2e | |
run: npm install | |
# Run Cypress Tests | |
- name: Run Cypress Tests | |
working-directory: ./e2e | |
run: npx cypress run | |
# Shutdown | |
- name: Shutdown | |
run: docker-compose -f docker-compose.prod.yml down |