Skip to content

Commit c612473

Browse files
committed
chore: CI test
1 parent 2c9ffdb commit c612473

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci-pr-main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CPI example
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
program_changed_files:
10+
runs-on: ubuntu-20.04
11+
outputs:
12+
program: ${{steps.changed-files-specific.outputs.any_changed}}
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Get specific changed files
18+
id: changed-files-specific
19+
uses: tj-actions/changed-files@v18.6
20+
with:
21+
files: |
22+
programs/cpi-example
23+
24+
cpi_example_test:
25+
runs-on: ubuntu-20.04
26+
needs: program_changed_files
27+
if: needs.program_changed_files.outputs.program == 'true'
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions-rs/toolchain@v1
31+
with:
32+
toolchain: 1.76
33+
- uses: Swatinem/rust-cache@v2
34+
- run: cargo test -- --no-capture
35+
shell: bash

0 commit comments

Comments
 (0)