-
Notifications
You must be signed in to change notification settings - Fork 143
29 lines (28 loc) · 889 Bytes
/
test.yml
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
name: Test
on:
push:
branches-ignore:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- run: npm run prettier -- --check
# Optional integration test of the action using a dedicated GitHub App.
- id: generate_token
if: ${{ vars.TEST_GITHUB_APP_ID != '' }}
uses: ./
with:
# The only required permission is `Repository permissions > Metadata: Read-only`.
app_id: ${{ vars.TEST_GITHUB_APP_ID }}
private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }}
- run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);"
if: ${{ steps.generate_token.outcome != 'skipped' }}