-
Notifications
You must be signed in to change notification settings - Fork 67
103 lines (95 loc) · 2.91 KB
/
ci.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches: [main]
tags:
- "*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18, 20]
fail-fast: false
services:
redis:
image: redis
# wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
REDIS_URL: redis://localhost:6379
DISABLE_TELEMETRY: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- if: ${{ matrix.node-version == 18 }}
uses: microsoft/playwright-github-action@v1
- run: npm i -g npm@7
- run: npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
- run: npm ci
- run: npm run build
- run: npm test -- --coverage
- if: ${{ matrix.node-version == 18 }}
name: Coveralls Quirrel
uses: coverallsapp/github-action@master
with:
flag-name: quirrel
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov.info
parallel: true
- if: ${{ matrix.node-version == 18 }}
run: npm ci
working-directory: development-ui
- if: ${{ matrix.node-version == 18 }}
name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: development-ui
- if: ${{ matrix.node-version == 18 }}
run: npm run test:ci
working-directory: development-ui
- if: ${{ matrix.node-version == 18 }}
name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=false
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}