mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Fix coveralls reporting (#1272)
Remove nested paths for checking out alternative versions of dependencies as this appears to break the github action upload of coverage.
This commit is contained in:
parent
d764a308b4
commit
6f608c54bf
23
.github/workflows/unit-tests.yml
vendored
23
.github/workflows/unit-tests.yml
vendored
@ -45,21 +45,19 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: vagrant-libvirt
|
|
||||||
- name: Clone vagrant for ruby 3.0 support
|
- name: Clone vagrant for ruby 3.0 support
|
||||||
if: ${{ matrix.ruby == '3.0.0' }}
|
if: ${{ matrix.ruby == '3.0.0' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: hashicorp/vagrant
|
repository: hashicorp/vagrant
|
||||||
path: vagrant
|
path: .deps/vagrant
|
||||||
ref: f7973f00edb9438d0b36085f210c80af71cfe5c5
|
ref: f7973f00edb9438d0b36085f210c80af71cfe5c5
|
||||||
- name: Clone ruby-libvirt for ruby 3.0 support
|
- name: Clone ruby-libvirt for ruby 3.0 support
|
||||||
if: ${{ matrix.ruby == '3.0.0' }}
|
if: ${{ matrix.ruby == '3.0.0' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: libvirt/libvirt-ruby
|
repository: libvirt/libvirt-ruby
|
||||||
path: libvirt-ruby
|
path: .deps/libvirt-ruby
|
||||||
ref: 43444be184e4d877c5ce110ee5475c952d7590f7
|
ref: 43444be184e4d877c5ce110ee5475c952d7590f7
|
||||||
- name: Set up libvirt
|
- name: Set up libvirt
|
||||||
run: |
|
run: |
|
||||||
@ -67,7 +65,7 @@ jobs:
|
|||||||
sudo apt-get install libvirt-dev
|
sudo apt-get install libvirt-dev
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: vagrant-libvirt/vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gems-
|
${{ runner.os }}-gems-
|
||||||
@ -79,41 +77,37 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
|
gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
|
||||||
gem update bundler --conservative
|
gem update bundler --conservative
|
||||||
working-directory: vagrant-libvirt
|
|
||||||
- name: Handle additional ruby 3.0 setup
|
- name: Handle additional ruby 3.0 setup
|
||||||
if: ${{ matrix.ruby == '3.0.0' }}
|
if: ${{ matrix.ruby == '3.0.0' }}
|
||||||
run: |
|
run: |
|
||||||
# ensure vagrant gemspec allows ruby 3.0
|
# ensure vagrant gemspec allows ruby 3.0
|
||||||
pushd ../vagrant/
|
pushd .deps/vagrant/
|
||||||
# ensure main branch exists
|
# ensure main branch exists
|
||||||
git checkout -b main
|
git checkout -b main
|
||||||
sed -i -e 's@s.required_ruby_version.*=.*@s.required_ruby_version = "~> 3.0"@' vagrant.gemspec
|
sed -i -e 's@s.required_ruby_version.*=.*@s.required_ruby_version = "~> 3.0"@' vagrant.gemspec
|
||||||
popd
|
popd
|
||||||
|
|
||||||
bundle config local.vagrant ${PWD}/../vagrant/
|
bundle config local.vagrant ${PWD}/.deps/vagrant/
|
||||||
|
|
||||||
# build gem of latest bindings that contain fix for ruby include path
|
# build gem of latest bindings that contain fix for ruby include path
|
||||||
pushd ../libvirt-ruby
|
pushd .deps/libvirt-ruby
|
||||||
rake gem
|
rake gem
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p vendor/bundle/ruby/3.0.0/cache/
|
mkdir -p vendor/bundle/ruby/3.0.0/cache/
|
||||||
cp ../libvirt-ruby/pkg/ruby-libvirt-*.gem vendor/bundle/ruby/3.0.0/cache/
|
cp .deps/libvirt-ruby/pkg/ruby-libvirt-*.gem vendor/bundle/ruby/3.0.0/cache/
|
||||||
# need the following to allow the local provided gem to be used instead of the
|
# need the following to allow the local provided gem to be used instead of the
|
||||||
# one from rubygems
|
# one from rubygems
|
||||||
bundle config set --local disable_checksum_validation true
|
bundle config set --local disable_checksum_validation true
|
||||||
working-directory: vagrant-libvirt
|
|
||||||
- name: Run bundler using cached path
|
- name: Run bundler using cached path
|
||||||
run: |
|
run: |
|
||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
bundle install --jobs 4 --retry 3
|
bundle install --jobs 4 --retry 3
|
||||||
working-directory: vagrant-libvirt
|
|
||||||
env:
|
env:
|
||||||
VAGRANT_VERSION: ${{ matrix.vagrant }}
|
VAGRANT_VERSION: ${{ matrix.vagrant }}
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
bundle exec rspec --color --format documentation
|
bundle exec rspec --color --format documentation
|
||||||
working-directory: vagrant-libvirt
|
|
||||||
env:
|
env:
|
||||||
VAGRANT_VERSION: ${{ matrix.vagrant }}
|
VAGRANT_VERSION: ${{ matrix.vagrant }}
|
||||||
- name: Coveralls Parallel
|
- name: Coveralls Parallel
|
||||||
@ -121,8 +115,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.github_token }}
|
github-token: ${{ secrets.github_token }}
|
||||||
parallel: true
|
parallel: true
|
||||||
path-to-lcov: ./vagrant-libvirt/coverage/lcov.info
|
path-to-lcov: ./coverage/lcov.info
|
||||||
|
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
needs: test
|
needs: test
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,6 +21,7 @@ Vagrantfile
|
|||||||
!example_box/Vagrantfile
|
!example_box/Vagrantfile
|
||||||
.vagrant
|
.vagrant
|
||||||
*.swp
|
*.swp
|
||||||
|
.deps
|
||||||
|
|
||||||
# don't commit the generated version
|
# don't commit the generated version
|
||||||
lib/vagrant-libvirt/version
|
lib/vagrant-libvirt/version
|
||||||
|
Loading…
Reference in New Issue
Block a user