Support the new constituencies for the July 2024 election #414
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
bundle-audit: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Check bundle for known CVEs | |
run: | | |
bundle exec rake bundle:audit | |
brakeman: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Analyse code for vulnerabilities | |
run: | | |
bundle exec rake brakeman:check | |
spec-admin-controllers: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/controllers/admin/*_spec.rb" | |
run: | | |
bundle exec rake spec:controllers | |
spec-public-controllers: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/controllers/*_spec.rb" | |
run: | | |
bundle exec rake spec:controllers | |
spec-jobs: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/jobs/**/*_spec.rb" | |
run: | | |
bundle exec rake spec:jobs | |
spec-mailers: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/mailers/**/*_spec.rb" | |
run: | | |
bundle exec rake spec | |
spec-models: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/models/**/*_spec.rb" | |
run: | | |
bundle exec rake spec | |
spec-requests: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/{requests,routing}/**/*_spec.rb" | |
run: | | |
bundle exec rake spec | |
spec-other: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
SPEC_OPTS: "-f doc -P spec/{helpers,lib,presenters,tasks,validators,views}/**/*_spec.rb" | |
run: | | |
bundle exec rake spec | |
javascript: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run javascript specs | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
run: | | |
bundle exec rake jasmine:ci | |
cucumber-admin: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Save screenshots | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: selenium-screenshots-admin | |
path: ${{ github.workspace }}/tmp/capybara/*.png | |
retention-days: 7 | |
if-no-files-found: ignore | |
- name: Save rails logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rails-logs-admin | |
path: ${{ github.workspace }}/log/test.log | |
retention-days: 7 | |
if-no-files-found: ignore | |
- name: Run cucumber specs | |
env: | |
CUCUMBER_FORMAT: pretty | |
CUCUMBER_OPTS: "--tags @admin --profile default" | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
run: | | |
bundle exec rake cucumber | |
cucumber-public: | |
runs-on: ubuntu-22.04 | |
services: | |
postgres: | |
image: postgres:12 | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
memcached: | |
image: memcached:1.5 | |
ports: ["11211:11211"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Setup gem cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor/bundle | |
key: ubuntu-22.04-gems-${{ hashFiles('/Gemfile.lock') }} | |
restore-keys: | | |
ubuntu-22.04-gems- | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Save screenshots | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: selenium-screenshots-public | |
path: ${{ github.workspace }}/tmp/capybara/*.png | |
retention-days: 7 | |
if-no-files-found: ignore | |
- name: Save rails logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rails-logs-public | |
path: ${{ github.workspace }}/log/test.log | |
retention-days: 7 | |
if-no-files-found: ignore | |
- name: Run cucumber specs | |
env: | |
CUCUMBER_FORMAT: pretty | |
CUCUMBER_OPTS: "--tags 'not @admin' --profile default" | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test | |
RAILS_ENV: test | |
run: | | |
bundle exec rake cucumber |