-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 2.06 KB
/
check.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
name: check
on:
- push
- pull_request
env:
RAILS_ENV: test
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: supabase/postgres:15.6.1.139
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: poetry
- name: Install Overmind
env:
OVERMIND_VERSION: 2.5.1
run: |
sudo apt-get install tmux
sudo curl -Lo /usr/bin/overmind.gz https://github.com/DarthSim/overmind/releases/download/v${{ env.OVERMIND_VERSION }}/overmind-v${{ env.OVERMIND_VERSION }}-linux-amd64.gz
sudo gzip -d /usr/bin/overmind.gz
sudo chmod u+x /usr/bin/overmind
sudo chown $(whoami) /usr/bin/overmind
- name: Set up environment
run: bin/setup
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
- name: Scan for common Rails security vulnerabilities using static analysis
run: bundle exec brakeman --no-pager
- name: Check lints and formatting
run: bin/check --all-files
- name: Run tests
run: bin/test
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
- name: Keep screenshots from failed system tests
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots
path: ${{ github.workspace }}/tmp/screenshots
if-no-files-found: ignore