-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (39 loc) · 1.08 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
name: 'build-test'
concurrency: 'build-test'
on:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run all
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: | # prepare test environment
cd ..
mkdir temp
mv ./nx-migration-gh-action/* ./temp
mv ./temp/test-setup/* ./nx-migration-gh-action
mv ./temp/dist ./nx-migration-gh-action/dist
mv ./temp/action.yml ./nx-migration-gh-action
cd ./nx-migration-gh-action
npm i
- uses: ./
id: nx_migrate
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
includeMigrationsFile: false
- run: 'echo "PR ID Output: ${{ steps.nx_migrate.outputs.prId }}"'
- name: Cleanup
if: steps.nx_migrate.outputs.prId
run: gh pr close --delete-branch "${{ steps.nx_migrate.outputs.prId }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}