-
Notifications
You must be signed in to change notification settings - Fork 18
67 lines (59 loc) · 2 KB
/
Copy pathtest-examples.yaml
File metadata and controls
67 lines (59 loc) · 2 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: test-examples
on:
# Manual trigger
workflow_dispatch: {}
# Automatic trigger after each release
# Note: Triggers on both successes and failures (see conditional below)
workflow_run:
workflows:
- release
types:
- completed
jobs:
install_script:
strategy:
fail-fast: false
matrix:
include:
- name: Linux / amd64
runs-on: ubuntu-latest
expected-install-path: /home/runner/.local/bin/kamu
- name: Linux / arm64
runs-on: ubuntu-24.04-arm
expected-install-path: /home/runner/.local/bin/kamu
name: Test examples / ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
if: |
github.event.workflow_run.conclusion == 'success' ||
github.event.workflow_run.conclusion == null ||
github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v5
with:
# Checkout the same commit that the release was built for (workflow_run)
# OR default to the current ref
ref: ${{ github.event.workflow_run.head_sha || github.ref }}
- uses: actions-rs/toolchain@v1
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo tools
run: |
cargo binstall cargo-nextest -y --force --github-token ${{ secrets.GITHUB_TOKEN }}
- name: Read kamu version
uses: SebRollen/toml-action@v1.2.0
id: read_version
with:
file: Cargo.toml
field: workspace.package.version
- name: Install release
shell: bash
run: |
curl -s "https://get.kamu.dev" | \
KAMU_VERSION=${{ steps.read_version.outputs.value }} \
sh -s
echo $(dirname ${{ matrix.expected-install-path }}) >> $GITHUB_PATH
- name: Build test runner
run: |
cargo test -p kamu-cli-e2e-example-tests --no-run
- name: Run tests
run: |
cargo nextest run -p kamu-cli-e2e-example-tests -E 'test(::examples::)' -v