Skip to content

Commit a066ff5

Browse files
committed
add GHA based tests
1 parent 7f1b357 commit a066ff5

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
version: 2
3+
updates:
4+
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"

.github/workflows/test.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Test
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- 'develop'
9+
- '*-stable'
10+
concurrency:
11+
group: ${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
rubocop:
16+
name: Rubocop
17+
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
18+
19+
test:
20+
name: "Ruby ${{ matrix.ruby }} / Puppet ${{ matrix.puppet }}"
21+
needs: rubocop
22+
runs-on: ubuntu-latest
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- ruby: '2.7'
28+
puppet: '7.0'
29+
- ruby: '3.0'
30+
puppet: '7.0'
31+
- ruby: '3.2'
32+
puppet: '8.0'
33+
env:
34+
PUPPET_VERSION: ${{ matrix.puppet }}
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Setup ruby
38+
uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: ${{ matrix.ruby }}
41+
bundler-cache: true
42+
- name: Run tests
43+
run: bundle exec rake spec
44+
- name: Test installer configuration
45+
run: |
46+
bundle exec rake install PREFIX=./local --trace
47+
bundle exec rake installation_tests PREFIX=./local --trace
48+
49+
# A dummy job that you can mark as a required check instead of each individual test
50+
test-suite:
51+
needs: test
52+
runs-on: ubuntu-latest
53+
name: Test suite
54+
steps:
55+
- run: echo Test suite completed

0 commit comments

Comments
 (0)