Skip to content

Commit 387d30b

Browse files
committed
Add GitHub Actions workflow for string_search_example tests
1 parent 6949ae8 commit 387d30b

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run string_search_example Tests on PR
2+
on:
3+
pull_request:
4+
paths:
5+
- "string_search_example/**"
6+
schedule:
7+
- cron: "0 2 * * *"
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
defaults:
13+
run:
14+
working-directory: string_search_example
15+
permissions:
16+
issues: write
17+
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Nargo
23+
uses: noir-lang/noirup@v0.1.2
24+
with:
25+
toolchain: stable
26+
27+
- name: Run Noir unit tests
28+
working-directory: string_search_example/string_search
29+
run: |
30+
nargo test
31+
32+
- name: Create issue on failure (nightly)
33+
if: failure() && github.event_name == 'schedule'
34+
uses: actions/github-script@v6
35+
with:
36+
script: |
37+
github.issues.create({
38+
owner: context.repo.owner,
39+
repo: context.repo.repo,
40+
title: '[Nightly] string_search_example workflow failed',
41+
body: `The nightly string_search_example workflow failed. Please investigate.\n\n/cc @noir-lang/developerrelations`,
42+
labels: ['nightly', 'bug']
43+
})

0 commit comments

Comments
 (0)