Skip to content

Commit c31d526

Browse files
authored
Merge pull request #156 from the-hideout/adjust-ci-workflows
Adjust ci workflows
2 parents 9e4d42e + c43f662 commit c31d526

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

.github/workflows/branch-deploy.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,15 @@ jobs:
3232

3333
- name: Use Node.js 16
3434
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
35-
uses: actions/setup-node@v3 # pin@v3
35+
uses: actions/setup-node@v3.6.0
3636
with:
3737
node-version: 16
38+
cache: npm
3839

3940
- name: Install dependencies
4041
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
4142
run: npm ci
4243

43-
- name: Test
44-
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
45-
env:
46-
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
47-
run: script/test
48-
4944
- name: Publish - Development
5045
if: ${{ steps.branch-deploy.outputs.environment == 'development' &&
5146
steps.branch-deploy.outputs.noop != 'true' &&

.github/workflows/deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515
uses: actions/checkout@v3.3.0
1616

1717
- name: Use Node.js 16
18-
uses: actions/setup-node@v3 # pin@v3
18+
uses: actions/setup-node@v3.6.0
1919
with:
2020
node-version: 16
21+
cache: npm
2122

2223
- name: Publish - Production
2324
uses: cloudflare/wrangler-action@3424d15af26edad39d5276be3cc0cc9ffec22b55 # pin@1.3.0

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches: [ main ]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v3.3.0
19+
20+
- name: Use Node.js 16
21+
uses: actions/setup-node@v3.6.0
22+
with:
23+
node-version: 16
24+
cache: npm
25+
26+
- run: npm ci
27+
28+
- name: test
29+
env:
30+
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
31+
run: script/test

0 commit comments

Comments
 (0)