-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.27 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
ci:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
services:
db:
image: postgres:10.19
env:
POSTGRES_DB: killswitch_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
CANONICAL_HOST: localhost
DATABASE_URL: postgres://postgres:postgres@localhost/killswitch_test
MAILER_FROM: localhost
RAILS_ENV: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: npm install
- run: make check
- run: make lint
- run: make test
- run: make build
- uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
ignore-unfixed: true
format: table
severity: 'CRITICAL,HIGH'
skip-dirs: vendor,node_modules
exit-code: 1