Skip to content

Commit d025c4c

Browse files
authored
Minor workflow fixes (#747)
This removes some useless checkouts, bumps the action version, uses cache in the setup-node action, and upgrade to supported node versions.
1 parent 23884c3 commit d025c4c

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

.github/workflows/approved_status.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
2727
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
2828
repository: DataDog/datadog-api-spec
29-
- name: Checkout code
30-
uses: actions/checkout@v2
3129
- name: Post PR review status check
3230
uses: DataDog/github-actions/[email protected]
3331
with:

.github/workflows/docs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717

18-
- name: Set up Node 14
19-
uses: actions/setup-node@v2
18+
- name: Set up Node 16
19+
uses: actions/setup-node@v3
2020
with:
21-
node-version: 14
21+
node-version: 16
22+
cache: 'yarn'
2223

2324
- name: Build documentation
2425
run: |

.github/workflows/prepare_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
2323
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
with:
2626
fetch-depth: 0
2727
token: ${{ steps.get_token.outputs.token }}
@@ -32,9 +32,10 @@ jobs:
3232
git config user.email "${GIT_AUTHOR_EMAIL}"
3333
3434
- name: Set up Node
35-
uses: actions/setup-node@v2
35+
uses: actions/setup-node@v3
3636
with:
37-
node-version: 14
37+
node-version: 16
38+
cache: 'yarn'
3839

3940
- name: Calculate version
4041
id: get_version

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
tag_name: tagName,
4545
});
4646
47-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v3
4848
with:
4949
fetch-depth: 0
5050
token: ${{ steps.get_token.outputs.token }}
@@ -55,9 +55,10 @@ jobs:
5555
git config user.email "${GIT_AUTHOR_EMAIL}"
5656
5757
- name: Set up Node
58-
uses: actions/setup-node@v2
58+
uses: actions/setup-node@v3
5959
with:
60-
node-version: 14
60+
node-version: 16
61+
cache: 'yarn'
6162

6263
- name: Bump version
6364
run: |

.github/workflows/test.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
with:
3030
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
3131
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v3
3333
if: github.event.pull_request.head.repo.full_name == github.repository
3434
with:
3535
fetch-depth: 0
3636
ref: ${{ github.event.pull_request.head.sha }}
3737
token: ${{ steps.get_token.outputs.token }}
3838
# Fetch a fork of the repo
39-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v3
4040
if: github.event.pull_request.head.repo.full_name != github.repository
4141
with:
4242
fetch-depth: 0
@@ -72,7 +72,7 @@ jobs:
7272
test:
7373
strategy:
7474
matrix:
75-
node-version: ["12", "14"]
75+
node-version: ["16", "18"]
7676
platform: [ubuntu-latest] # , macos-latest, windows-latest]
7777
# test only latest version on macos and windows
7878
# exclude:
@@ -83,11 +83,12 @@ jobs:
8383
runs-on: ${{ matrix.platform }}
8484
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')
8585
steps:
86-
- uses: actions/checkout@v2
86+
- uses: actions/checkout@v3
8787
- name: Set up Node ${{ matrix.node-version }}
88-
uses: actions/setup-node@v2
88+
uses: actions/setup-node@v3
8989
with:
9090
node-version: ${{ matrix.node-version }}
91+
cache: 'yarn'
9192
- name: Test
9293
run: ./run-tests.sh
9394
shell: bash
@@ -96,11 +97,12 @@ jobs:
9697
runs-on: ubuntu-latest
9798
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')
9899
steps:
99-
- uses: actions/checkout@v2
100-
- name: Set up Node 14
101-
uses: actions/setup-node@v2
100+
- uses: actions/checkout@v3
101+
- name: Set up Node 16
102+
uses: actions/setup-node@v3
102103
with:
103-
node-version: 14
104+
node-version: 16
105+
cache: 'yarn'
104106
- name: Check examples
105107
run: ./check-examples.sh
106108
shell: bash
@@ -120,8 +122,6 @@ jobs:
120122
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
121123
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
122124
repository: DataDog/datadog-api-spec
123-
- name: Checkout code
124-
uses: actions/checkout@v2
125125
- name: Post status check
126126
uses: DataDog/github-actions/[email protected]
127127
with:

.github/workflows/test_integration.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
4141
repository: DataDog/datadog-api-spec
4242
- name: Checkout code
43-
uses: actions/checkout@v2
43+
uses: actions/checkout@v3
4444
- name: Post pending status check
4545
if: github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
4646
uses: DataDog/github-actions/[email protected]
@@ -49,10 +49,11 @@ jobs:
4949
repo: datadog-api-spec
5050
status: pending
5151
context: integration
52-
- name: Set up Node 14
53-
uses: actions/setup-node@v2
52+
- name: Set up Node 16
53+
uses: actions/setup-node@v3
5454
with:
55-
node-version: 14
55+
node-version: 16
56+
cache: 'yarn'
5657
- name: Run integration tests
5758
run: ./run-tests.sh
5859
shell: bash

0 commit comments

Comments
 (0)