forked from Katello/hammer-cli-katello
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 998 Bytes
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Run unit tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.3, 2.4, 2.5]
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: ${{ matrix.ruby }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Add hammer-cli-foreman to local gem file
run: echo "gem 'hammer_cli_foreman', :git => 'https://github.com/theforeman/hammer-cli-foreman.git'" > Gemfile.local
- name: Add hammer-cli to local gem file
run: echo "gem 'hammer_cli', :git => 'https://github.com/theforeman/hammer-cli.git'" >> Gemfile.local
- name: Install dependencies
run: bundle install
- name: Bundle update
run: gem update bundler
- name: Run tests
run: COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} bundle exec rake