-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (85 loc) · 2.32 KB
/
pr-checks.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
name: PR Checks
on:
pull_request:
push: { branches: [main] }
jobs:
backend-checks:
# Match Heroku 22 stack
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
cache-version: 1
- name: Update apt
run: sudo apt-get update -yqq -o Acquire::Retries=3
- name: Install dependencies
run: sudo apt-get install --fix-missing -yqq -o Acquire::Retries=3 libvips libpq-dev
- name: Start backing services
run: docker compose up -d
- name: Run rubocop
run: bundle exec rubocop
- name: Wait for services to come up
run: sleep 0
- name: Run specs
env:
RACK_ENV: test
run: |
bundle exec rake db:migrate
bundle exec rspec spec/
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: lithictech/suma
webapp-checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webapp
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16.13
- uses: actions/cache@v1
with:
path: ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-
- run: npm install
- run: npm run prettier-check
- run: npm run eslint-check
- run: CI=true npm test
adminapp-checks:
runs-on: ubuntu-latest
defaults:
run:
working-directory: adminapp
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16.13
- uses: actions/cache@v1
with:
path: ~/.npm
key: node-${{ hashFiles('**/package-lock.json') }}
restore-keys: node-
- run: npm install
- run: npm run prettier-check
- run: npm run eslint-check
- run: CI=true npm test