add rubocop action #7
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: 2018-ruby | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
paths: | |
- 2018/ruby/** | |
defaults: | |
run: | |
working-directory: ./2018/ruby | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Determine ruby version | |
id: determine-ruby-version | |
run: | | |
VERSION=$(cat .ruby-version) | |
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT" | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ steps.determine-ruby-version.outputs.VERSION }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rspec |