Skip to content

Commit

Permalink
Automate testing and code ownership
Browse files Browse the repository at this point in the history
Use GitHub Actions to automate testing and static code analysis. In
addition repository contributors are specified as codeowners so that
proposed changes are seen quicker.
  • Loading branch information
tomasbasham committed Sep 7, 2022
1 parent e14e0fe commit 3ffa021
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These owners will be the default owners for everything in the repo. Unless a
# later match takes precedence, these owner(s) will be requested for review
# when someone opens a pull request.
* @StatusCakeDev/developers

# Order is important; the last matching pattern takes the most precedence. When
# someone opens a pull request that only modifies Ruby files, only these
# owner(s) and not the global owner(s) will be requested for a review.
*.rb @StatusCakeDev/developers
24 changes: 24 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
bundle exec gem build statuscake.gemspec
bundle exec gem push *.gem
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
23 changes: 23 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- "3.1"
- "3.0"
- "2.7"
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rubocop
- run: bundle exec rake spec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# statuscake-rb
# statuscake-rb ![test](https://github.com/StatusCakeDev/statuscake-rb/workflows/test/badge.svg)

**NOTE**: This library is in alpha and not production ready. Whilst it can be
used we will not offer support until it is generally available.
Expand Down

0 comments on commit 3ffa021

Please sign in to comment.