forked from vagrant-libvirt/vagrant-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from travis to github actions for unit tests (vagrant-libvirt#…
…1206) Migrate to github actions as travis has switched to a process that will require requesting minutes regularly for open source projects, and current development is slow enough that this additional overhead is too much. Correct the generation of the line coverage following the example at coverallsapp/github-action#29. Remove dependency on coveralls gem as no longer needed if using the action. Patch older versions of simplecov to contain a branch_coverage? method to ensure working with simplecov-lcov.
- Loading branch information
1 parent
978e92e
commit 66d394d
Showing
6 changed files
with
115 additions
and
40 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 |
---|---|---|
@@ -1 +1 @@ | ||
service_name: travis-ci | ||
service_name: github-actions |
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,90 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | ||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.allow_fail }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# need to define one entry with a single entry for each of the options | ||
# to allow include to expand the matrix correctly. | ||
ruby: [2.6.6] | ||
vagrant: [main] | ||
allow_fail: [true] | ||
include: | ||
- ruby: 2.2.10 | ||
vagrant: v2.0.4 | ||
allow_fail: false | ||
- ruby: 2.3.5 | ||
vagrant: v2.1.5 | ||
allow_fail: false | ||
- ruby: 2.4.10 | ||
vagrant: v2.2.4 | ||
allow_fail: false | ||
- ruby: 2.6.6 | ||
vagrant: v2.2.14 | ||
allow_fail: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up libvirt | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libvirt-dev | ||
- uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- name: Set up rubygems | ||
run: | | ||
gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems) | ||
gem update bundler --conservative | ||
- name: Run bundler using cached path | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
env: | ||
VAGRANT_VERSION: ${{ matrix.vagrant }} | ||
- name: Run tests | ||
run: | | ||
bundle exec rspec --color --format documentation | ||
cat ./coverage/lcov.info | ||
env: | ||
VAGRANT_VERSION: ${{ matrix.vagrant }} | ||
- name: Coveralls Parallel | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
flag-name: run-${{ matrix.vagrant }} | ||
parallel: true | ||
|
||
|
||
finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,5 +36,3 @@ end | |
group :plugins do | ||
gemspec | ||
end | ||
|
||
gem 'coveralls', require: false |
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
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