-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (60 loc) · 1.54 KB
/
push.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
name: CI
on: push
env:
GITHUB_OAUTH_TOKEN: abc123
GITHUB_APP_ID: abc123
GITHUB_APP_SECRET: abc123
GITHUB_REPO: openpolitics/manifesto
SITE_URL: https://groupthink.example.com
EMAIL_DOMAIN: example.com
BLOCK_WEIGHT: -1000
YES_WEIGHT: 1
NO_WEIGHT: -1
MIN_AGE: 7
MAX_AGE: 90
PASS_THRESHOLD: 2
BLOCK_THRESHOLD: -1
PROJECT_URL: https://openpolitics.org.uk/manifesto
PROJECT_NAME: The OpenPolitics Manifesto
SMTP_USERNAME: foo
SMTP_PASSWORD: bar
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install sqlite3
run: |
sudo apt update
sudo apt install libsqlite3-dev
- uses: eregon/use-ruby-action@master
with:
ruby-version: "2.7"
- uses: actions/checkout@v1
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --without=production
- name: Set up the test database
run: |
RAILS_ENV=test bundle exec rake db:setup
- name: Run the tests
run: |
bundle exec rake
lint:
runs-on: ubuntu-latest
steps:
- name: Install sqlite3
run: |
sudo apt update
sudo apt install libsqlite3-dev
- uses: eregon/use-ruby-action@master
with:
ruby-version: "2.7"
- uses: actions/checkout@v1
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --without=production
- name: Run the linter
run: |
bundle exec rubocop