-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.3 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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