Skip to content

Commit abd2cb7

Browse files
authored
Update README.md
1 parent acb002a commit abd2cb7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,34 @@ MAINNET_MULTISIG= # Mainnet Squads multisig address
104104
MAINNET_MULTISIG_VAULT= # Mainnet Squads vault address
105105
```
106106

107+
This is how you can run anchor tests everytime tests or the program changed on push:
108+
109+
```yaml
110+
name: Anchor Tests
111+
112+
on:
113+
push:
114+
branches: [main]
115+
paths:
116+
- "programs/**"
117+
- "tests/**"
118+
- "Anchor.toml"
119+
- "Cargo.toml"
120+
- "Cargo.lock"
121+
workflow_dispatch:
122+
inputs:
123+
program:
124+
description: "Program to test"
125+
required: true
126+
default: "transaction_example"
127+
128+
jobs:
129+
test:
130+
uses: solana-developers/github-workflows/.github/workflows/[email protected]
131+
with:
132+
program: ${{ 'transaction_example' }}
133+
```
134+
107135
### Extend and automate
108136
109137
You can easily extend or change your workflow. For example run the build workflow automatically on every push to a development branch.

0 commit comments

Comments
 (0)