-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Run Specs | ||
|
||
on: | ||
push: | ||
permissions: | ||
contents: read | ||
# We need write access to the id-token to use workload identity federation | ||
id-token: write | ||
packages: read | ||
# Needed for getting PR labels | ||
pull-requests: read | ||
|
||
|
||
env: | ||
PGDATABASE: que-test | ||
PGUSER: ubuntu | ||
PGPASSWORD: password | ||
PGHOST: localhost | ||
|
||
jobs: | ||
rspec: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby_version: ["2.6", "2.7", "3.0"] | ||
|
||
services: | ||
postgres: | ||
image: postgres:11.2 | ||
env: | ||
POSTGRES_DB: que-test | ||
POSTGRES_USER: ubuntu | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Check Out Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Bundle | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: bundle-${{ matrix.ruby_version }}-${{ hashFiles('que.gemspec', 'Gemfile') }} | ||
|
||
- name: Bundle Install | ||
run: | | ||
gem install bundler --no-document | ||
bundle config set no-cache 'true' | ||
bundle config set jobs '4' | ||
bundle config set retry '3' | ||
bundle install | ||
- name: Run Specs | ||
run: | | ||
bundle exec rspec |