Skip to content

Commit

Permalink
Convert test jobs to a matrix Github Actions job (#29)
Browse files Browse the repository at this point in the history
* Convert test job to a matrix job.

* Convert test job to a matrix job.

* Convert test job to a matrix job.

* Convert test job to a matrix job.

* Update versions of GHA

* Update checkout and cache actions.

* Update checkout and cache actions.
  • Loading branch information
baldimir authored Apr 16, 2024
1 parent a838a30 commit 52bcab0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
ruby-version: [2.7, '3.0', 3.1]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
ruby-version: 2.7

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -56,13 +56,13 @@ jobs:
ruby-version: 2.7

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby-version }}

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
31 changes: 9 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,23 @@ on:
branches: [ '*' ]

jobs:
jbang-drools-stable:
drools-matrix:
runs-on: ubuntu-latest
name: Testing with Drools latest stable release
steps:
- name: checkout
uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: /root/.jbang
key: $-jbang-$
restore-keys: |
$-jbang-
- name: jbang
uses: jbangdev/jbang-action@v0.111.0
with:
script: test.java
jbang-drools-snapshot:
runs-on: ubuntu-latest
name: Testing with Drools latest SNAPSHOT release
name: Test with Drools
strategy:
matrix:
drools_version: [9.44.0.Final, 999-SNAPSHOT]
steps:
- name: checkout
uses: actions/checkout@v1
- uses: actions/cache@v1
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: /root/.jbang
key: $-jbang-$
restore-keys: |
$-jbang-
- name: jbang
uses: jbangdev/jbang-action@v0.111.0
uses: jbangdev/jbang-action@v0.115.0
with:
script: test.java
jbangargs: -Ddrools.version=999-SNAPSHOT
jbangargs: -Ddrools.version=${{ matrix.drools_version }}
2 changes: 1 addition & 1 deletion test.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
//REPOS mavencentral,apache=https://repository.apache.org/content/groups/public/
//DEPS org.kie:kie-dmn-feel:${drools.version:9.44.0.Final}
//DEPS org.kie:kie-dmn-feel:${drools.version}
//DEPS org.slf4j:slf4j-simple:1.7.36
//DEPS info.picocli:picocli:4.7.5
//DEPS com.vladsch.flexmark:flexmark-all:0.64.8
Expand Down

0 comments on commit 52bcab0

Please sign in to comment.