-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (30 loc) · 1.2 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
name: CI/CD
on:
- push
jobs:
# FIRST JOB => check if code is valid
code-checks:
name: Code Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # IMPORTANT TO NOTE! this action allows the job to access/check out the repository under $GITHUB_WORKSPACE (https://github.com/marketplace/actions/checkout)
- uses: actions/setup-node@v4
with:
node-version: 18
- run: mv .env.example .env
- run: npm install
- run: npm run test
- run: npm run lint
- run: npm run format:check
- run: npm run types:check
# SECOND JOB => run e2e tests
# it will build the app, start it and run all e2e tests
e2e:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cypress-io/github-action@v6 # this action installs dependencies and caches them for future use, then run cypress e2e tests on election browser and gives us test summary after completion (https://github.com/marketplace/actions/cypress-io)
with:
build: npm run build
start: npm run start