Update dependency overcommit to '~> 0.62.0' #1365
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: Lint & test | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Ruby | |
# Install the version defined in .ruby-version | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
env: | |
BUNDLE_FROZEN: "true" | |
- name: Run git hooks | |
run: | | |
bundle exec overcommit --sign | |
bundle exec overcommit --run | |
env: | |
OVERCOMMIT_COLOR: "1" | |
- name: Run RuboCop | |
run: bundle exec rubocop --parallel --format github | |
- name: Configure PostgreSQL authentication | |
run: | | |
# Add our authentication line before everything else | |
# https://unix.stackexchange.com/a/99351 | |
sudo sed --in-place '1 i\local all lea5 md5' /etc/postgresql/*/main/pg_hba.conf | |
sudo systemctl restart postgresql.service | |
- name: Create PostgreSQL user and database | |
run: cp ./.github/workflows/init_db.sql /tmp/ && sudo --user postgres psql --file /tmp/init_db.sql | |
- name: Migrate database | |
run: bundle exec rails db:migrate RAILS_ENV=test | |
- name: Run tests | |
run: bundle exec rails test:all | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |