Skip to content

[TEMP] Check Actions' permissions #107

[TEMP] Check Actions' permissions

[TEMP] Check Actions' permissions #107

Workflow file for this run

name: Run tests
on:
- push
- pull_request
permissions:
contents: read
pull-requests: write # coverage report
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: shiori
POSTGRES_PASSWORD: rootpass
POSTGRES_DB: shiori_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run tests
run: |
bundle exec rails zeitwerk:check
bundle exec rails db:migrate
bundle exec rspec
- name: Report coverage
if: ${{ github.event_name == 'pull_request' }}
uses: romeovs/[email protected]
with:
lcov-file: ./coverage/lcov/shiori.lcov
filter-changed-files: true