forked from withfig/push-to-fig-autocomplete-action
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (88 loc) · 3.25 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- "releases/*"
workflow_dispatch:
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Rebuild the dist/ directory
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
pnpm run all
test-simple-spec: # make sure the action works on a clean machine without building
if: startsWith(github.head_ref, 'auto-update') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Create Autocomplete PR"
id: simple-spec
uses: ./
with:
token: ${{ secrets.FIG_BOT_TOKEN }}
autocomplete-spec-name: __integration-tests__/simple-spec/cli
spec-path: src/__integration-tests__/simple-spec/new-cli.ts
integration: commander
repo-name: push-to-fig-autocomplete-action
repo-org: withfig
pr-body: "Integration test (simple-spec)"
diff-based-versioning: false
- name: Close Pull
run: gh pr close --comment "Closing created PR" --delete-branch ${{ steps.simple-spec.outputs.pr-number }}
env:
GH_TOKEN: ${{ secrets.FIG_BOT_TOKEN }}
test-diff-based-versioning:
if: startsWith(github.head_ref, 'auto-update') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Create Autocomplete PR"
id: diff-based-versioning
uses: ./
with:
token: ${{ secrets.FIG_BOT_TOKEN }}
autocomplete-spec-name: __integration-tests__/diff-based-versioning/cli
spec-path: src/__integration-tests__/diff-based-versioning/new-cli.ts
integration: commander
repo-name: push-to-fig-autocomplete-action
repo-org: withfig
pr-body: "Integration test (diff-based-versioning)"
diff-based-versioning: true
new-spec-version: 1.1.0
- name: Close Pull
run: gh pr close --comment "Closing created PR" --delete-branch ${{ steps.diff-based-versioning.outputs.pr-number }}
env:
GH_TOKEN: ${{ secrets.FIG_BOT_TOKEN }}
test-spec-folder:
if: startsWith(github.head_ref, 'auto-update') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Create Autocomplete PR"
id: spec-folder
uses: ./
with:
token: ${{ secrets.FIG_BOT_TOKEN }}
autocomplete-spec-name: __integration-tests__/spec-folder/cli
spec-path: src/__integration-tests__/spec-folder/new-cli.ts
spec-folder-path: src/__integration-tests__/spec-folder/new-cli
repo-name: push-to-fig-autocomplete-action
repo-org: withfig
pr-body: "Integration test (spec-folder)"
- name: Close Pull
run: gh pr close --comment "Closing created PR" --delete-branch ${{ steps.spec-folder.outputs.pr-number }}
env:
GH_TOKEN: ${{ secrets.FIG_BOT_TOKEN }}