Update dependency ruby to v3 - autoclosed #1748
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
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
name: Test and push coverage to coveralls | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
services: | |
db: | |
image: postgres:13 | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
- name: Cache ruby gems | |
uses: actions/cache@v1 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ secrets.CACHE_VERSION }}-gems- | |
- name: Install hunspell library | |
run: | | |
sudo apt install hunspell | |
- name: Install ruby gems | |
run: | | |
bundle config path vendor/bundle | |
bundle config --local build.sassc --disable-march-tune-native | |
bundle install --jobs 4 --retry 3 | |
- name: Run tests | |
env: | |
DATABASE_URL: postgres://postgres:@localhost:5432/test | |
RAILS_ENV: test | |
run: | | |
bundle exec brakeman -qAzw1 | |
bundle exec bundle-audit check --update --ignore CVE-2021-21305 CVE-2021-21288 | |
bundle exec rails db:create | |
bundle exec rails test | |
bundle exec rails spellcheck | |
bundle exec rubocop | |
- name: Upload coverage results | |
uses: actions/upload-artifact@master | |
if: always() | |
with: | |
name: coverage-report | |
path: coverage |