-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (56 loc) · 1.78 KB
/
review.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
52
53
54
55
56
57
58
name: Pre-merge Review
on: [pull_request]
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Prune containers
run: |
docker system prune -af
- name: install dependencies 🚀
run: |
yarn install --frozen-lockfile # optional, --immutable
- name: linting ✨
run: |
yarn lint
- name: style check 💅
run: |
yarn style
- name: running test 🛫🛬
run: |
yarn test --coverage src
- name: upload coverage to Codecov 💌
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: build fusion docker image
run: |
docker build . --tag=nexus-web:fresh
- name: Start services
run: docker compose -f ci/docker-compose.yml up -d && sleep 60
- name: Copy nexus-web into Cypress container
# avoids permission issue where cypress writes screenshots to host with root as user
# which we can't then delete easily
run: docker cp ./. cypress:/e2e
# Uncomment for now in order to create the release
# - name: e2e tests
# run: >-
# echo | timeout --verbose 120m docker exec
# -e 'DEBUG=cypress:launcher:browsers'
# -t
# cypress
# cypress run
# --config-file cypress.config.ts
# --browser chrome
# --headless
# --record
# --key ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Cleanup Docker Containers
if: ${{ always() }}
run: docker compose -f ci/docker-compose.yml down --rmi "local" --volumes