Skip to content

Commit

Permalink
Testing GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
janosrusiczki committed Oct 16, 2019
1 parent 2749daa commit d2909d2
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions .github/workflows/gempush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,26 @@ jobs:
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Run Rubocop

- name: Run bundle install
run: |
bundle install
bundle exec rubocop
bundle info rgeo
- name: Run rubocop
run: bundle exec rubocop

- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: project-directory
path: /home/runner/work/underpass/underpass

- name: Upload bundle
uses: actions/upload-artifact@master
with:
name: gem-bundle
path: /opt/hostedtoolcache/Ruby/2.6.3/x64/lib/ruby/gems/2.6.0/gems

rspec:
name: Specs
Expand All @@ -27,21 +42,30 @@ jobs:
needs: rubocop

steps:
- uses: actions/checkout@master

- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x

- name: Download artifact
uses: actions/download-artifact@master
with:
name: project-directory
path: /home/runner/work/underpass/underpass

- name: Download bundle
uses: actions/download-artifact@master
with:
name: gem-bundle
path: /opt/hostedtoolcache/Ruby/2.6.3/x64/lib/ruby/gems/2.6.0/gems

- name: Run specs
run: |
bundle install
bundle exec rspec
- name: Run rspec
run: bundle exec rspec

publish:
name: Publish
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

needs: rspec

Expand All @@ -54,7 +78,6 @@ jobs:
ruby-version: 2.6.x

- name: Publish to RubyGems
if: github.ref == 'master'
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
Expand Down

0 comments on commit d2909d2

Please sign in to comment.