-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to GitHub Actions from Travis CI
Travis CI no longer has an "all you can eat" FLOSS offer, and all my credits are used up. Let's try GitHub Actions; it worked for the RubyGems folks with their nronn fork. * #88 * n-ronn/nronn#8 Co-authored-by: Takuya Noguchi <[email protected]>
- Loading branch information
Showing
5 changed files
with
156 additions
and
26 deletions.
There are no files selected for viewing
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,62 @@ | ||
name: Ruby | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev/gh-actions" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
continue-on-error: ${{ matrix.unsupported }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: ['2.7', '3.0'] | ||
unsupported: [false] | ||
include: | ||
- ruby-version: '2.4' | ||
unsupported: true | ||
- ruby-version: '2.5' | ||
unsupported: true | ||
- ruby-version: '2.6' | ||
unsupported: true | ||
- ruby-version: '3.1' | ||
unsupported: true | ||
- ruby-version: head | ||
unsupported: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Remove Gemfile.lock | ||
run: rm -f Gemfile.lock | ||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
continue-on-error: ${{ matrix.unsupported }} # Only for Ruby 2.4 | ||
- name: Run tests | ||
run: bundle exec rake test | ||
continue-on-error: ${{ matrix.unsupported }} | ||
- name: Run man tests | ||
run: bundle exec rake man | ||
continue-on-error: ${{ matrix.unsupported }} # Only for Ruby 2.4 | ||
|
||
rubocop: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Remove Gemfile.lock | ||
run: rm -f Gemfile.lock | ||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: 2.7.6 | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Run RuboCop | ||
run: bundle exec rubocop |
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,34 @@ | ||
# We do not have plan to support | ||
name: JRuby | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: [jruby-9.2.9.0, jruby-head] | ||
continue-on-error: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Remove Gemfile.lock | ||
run: rm -f Gemfile.lock | ||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Run tests | ||
run: bundle exec rake test | ||
continue-on-error: true | ||
- name: Run man tests | ||
run: bundle exec rake man | ||
continue-on-error: true |
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,57 @@ | ||
# Currently broken and disabled. | ||
# We don't have GitHub Pages set up yet. And it fails with this error | ||
# anyway, in the 'bundle install' step: | ||
# You are trying to install in deployment mode after changing | ||
# your Gemfile. | ||
name: Deploy to GitHub Pages | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1.2' | ||
bundler-cache: true # 'bundle install' and cache | ||
|
||
# cf. https://github.com/actions/starter-workflows/blob/4a8f18e34dd13d2b6ee4d8da2ba72629eafe1609/pages/jekyll.yml | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v1 | ||
|
||
- name: Build the pages | ||
run: bundle exec rake man | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "man/" # The action will automatically upload an artifact from this directory | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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