Skip to content

Commit

Permalink
Matrix test
Browse files Browse the repository at this point in the history
  • Loading branch information
genya0407 committed Feb 29, 2024
1 parent 13a2b80 commit 32cb828
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

on: pull_request
jobs:
cargo_test:
cargo_test_workspace:
name: cargo test
runs-on: ubuntu-latest

Expand All @@ -15,9 +15,31 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace

cargo_test_all_versions:
name: cargo test ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "3_1_0"
- "3_2_0"
- "3_3_0"
- master
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3"
- run: cargo test -F mruby_${{ matrix.version }}
working-directory: minutus
- run: |
cp cargo_tomls/${{ matrix.version }}.toml Cargo.toml
cargo test
working-directory: minutus-test
generate-example-matrix:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -70,7 +92,13 @@ jobs:

aggregated-ci:
runs-on: ubuntu-latest
needs: [cargo_test, minutus-mrbgem-template, examples]
needs:
[
cargo_test_all_versions,
cargo_test_workspace,
minutus-mrbgem-template,
examples,
]
if: always()
steps:
- name: All tests ok
Expand Down
9 changes: 9 additions & 0 deletions minutus-test/cargo_tomls/3_1_0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "minutus-test"
version = "0.1.0"
edition = "2021"
publish = []

[dependencies]
minutus = { path = "../minutus", features = ["link_mruby", "mruby_3_1_0] }
regex = "1"
9 changes: 9 additions & 0 deletions minutus-test/cargo_tomls/3_2_0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "minutus-test"
version = "0.1.0"
edition = "2021"
publish = []

[dependencies]
minutus = { path = "../minutus", features = ["link_mruby", "mruby_3_2_0] }
regex = "1"
9 changes: 9 additions & 0 deletions minutus-test/cargo_tomls/3_3_0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "minutus-test"
version = "0.1.0"
edition = "2021"
publish = []

[dependencies]
minutus = { path = "../minutus", features = ["link_mruby", "mruby_3_3_0] }
regex = "1"
9 changes: 9 additions & 0 deletions minutus-test/cargo_tomls/master.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "minutus-test"
version = "0.1.0"
edition = "2021"
publish = []

[dependencies]
minutus = { path = "../minutus", features = ["link_mruby", "mruby_master] }
regex = "1"

0 comments on commit 32cb828

Please sign in to comment.