-
Notifications
You must be signed in to change notification settings - Fork 206
76 lines (62 loc) · 1.89 KB
/
frontend-qa.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: OpenELis Frontend QA framework workflow
on:
push:
branches: [develop]
pull_request:
branches: [develop]
workflow_dispatch:
env:
DOCKER_NAME: ${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-frontend
jobs:
build-prod-frontend-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_NAME }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: false
build-and-run-qa-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenELIS-Global2
uses: actions/checkout@v2
with:
repository: ${{github.repository}}
submodules: recursive
- name: Run OpenELIS image
run: docker compose -f build.docker-compose.yml up -d --build --wait --wait-timeout 600
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Install dependencies
run: npm install
working-directory: frontend
- name: Install React scripts
run: npm install [email protected] -g
working-directory: frontend
- name: Run Frontend Qa Workflow
run: npx cypress run –headless
working-directory: frontend
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
# Only show last 100 lines of each
tail: "100"