Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
build: add a Github action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dperrett committed Sep 11, 2023
1 parent 416e51e commit dc93403
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: rack-cloudflare-jwt (test)

# Cancel in-progress jobs.
concurrency:
group: rack-cloudflare-jwt-${{ github.ref }}
cancel-in-progress: true

on: [push]

jobs:
test:
runs-on: ubuntu-latest

env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
FORCE_COLOR: 1
RACK_ENV: test

defaults:
run:
working-directory: ./

steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.2'

- name: Install dependencies
run: bundle install

- name: Docker Login
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN"

- name: test
run: bundle exec rake

- name: rubocop
run: bundle exec rubocop
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ RSpec/MessageSpies:

RSpec/MultipleMemoizedHelpers:
Max: 10

Gemspec/DevelopmentDependencies:
Enabled: false

0 comments on commit dc93403

Please sign in to comment.