Bump actionmailer from 7.1.4 to 7.1.4.1 (#3291) #2958
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 and test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
dockercheck: | |
name: Verify docker build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Bring up containers | |
run: | | |
docker compose build | |
docker compose run --rm web rails db:create db:migrate db:seed | |
docker compose up -d | |
sleep 30 | |
docker compose logs -t | |
docker ps -a | (! grep Exited ) # Return a non-zero exit code if any of the containers are stopped | |
build: | |
name: Run tests | |
runs-on: ubuntu-latest | |
env: | |
POSTGRES_USER: daria | |
POSTGRES_PASSWORD: "" | |
CI: true | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: daria | |
POSTGRES_DB: dcaf_case_management_test | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
# Add a health check | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Ruby setup | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 # automagically reads from .ruby-version | |
with: | |
bundler-cache: true | |
# npm/yarn setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.19.0 | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn packages | |
run: yarn install | |
# Run JS tests | |
- name: Run Javascript test suite | |
run: yarn test | |
# System setup | |
- name: Install | |
run: sudo apt-get -yqq install libpq-dev google-chrome-stable | |
# App setup | |
- name: Asset compilation | |
run: NODE_ENV=test bin/rails assets:precompile | |
- name: Database setup setup | |
run: RAILS_ENV=test bin/rails db:create db:migrate | |
# Run Rails tests | |
- name: Run Rails test suite | |
run: bin/rails test:all | |
# Save artifacts | |
- name: Store coverage artifact | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: code-coverage-report | |
path: coverage | |
- name: Store test artifacts | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: capybara-screenshots | |
path: tmp/capybara/ | |
scan: | |
name: Run static scanners | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Ruby setup | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 # automagically reads from .ruby-version | |
with: | |
bundler-cache: true | |
- name: Install scanners | |
run: | | |
gem install --no-document brakeman ruby_audit bundler-audit | |
# Run scanners | |
- name: Brakeman | |
run: brakeman --exit-on-warn . | |
- name: ruby-audit | |
run: bundle exec ruby-audit check | |
- name: bundle-audit | |
run: bundle-audit update; bundle-audit check | |
- name: Zeitwerk | |
run: bin/rails zeitwerk:check | |
- name: yarn npm audit | |
run: yarn npm audit --ignore 1098356 --ignore 1098400 --ignore 1098602 --ignore 1099461 | |