chore(deps): update dependency importmap-rails to v2 #1710
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 | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
id-token: write # to get access to GitHub autogenerated OIDC token, used by codecov/codecov-action | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
# Install the version defined in .ruby-version | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
rubygems: latest | |
env: | |
BUNDLE_FROZEN: "true" | |
- name: Run git hooks | |
run: | | |
# Sign Overcommit configuration | |
bundle exec overcommit --sign | |
# Sign our custom hooks | |
bundle exec overcommit --sign pre-commit | |
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 scram-sha-256' /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@v4 | |
with: | |
use_oidc: true |