-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (39 loc) · 1.18 KB
/
test.yaml
File metadata and controls
45 lines (39 loc) · 1.18 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
name: Test Program
on:
workflow_call:
inputs:
program:
description: "Program to test"
required: true
type: string
branch:
description: "Branch to test"
required: false
type: string
default: "*"
testresults:
description: "Optional testresults to upload"
required: false
type: string
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: solana-developers/github-actions/extract-versions@v0.2.4
id: versions
- uses: solana-developers/github-actions/setup-all@v0.2.4
with:
solana_version: ${{ steps.versions.outputs.solana_version }}
anchor_version: ${{ steps.versions.outputs.anchor_version }}
node_version: 20
- uses: solana-developers/github-actions/run-tests@v0.2.4
with:
program: ${{ inputs.program }}
# Conditionally upload the file if filename is set
- name: Upload Test Results (if filename is set)
if: inputs.testresults != ''
uses: actions/upload-artifact@v4
with:
name: test-results
path: ${{ inputs.testresults }}