Skip to content

Commit db35774

Browse files
authored
Avoid testing in same CI jobs as releases (microsoft#58002)
1 parent e256ec1 commit db35774

File tree

3 files changed

+65
-8
lines changed

3 files changed

+65
-8
lines changed

.github/workflows/insiders.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,27 @@ defaults:
1515
shell: bash
1616

1717
jobs:
18-
build:
18+
test:
19+
runs-on: ubuntu-latest
20+
if: github.repository == 'microsoft/TypeScript'
21+
22+
steps:
23+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
25+
- run: |
26+
npm --version
27+
# corepack enable npm
28+
npm install -g $(jq -r '.packageManager' < package.json)
29+
npm --version
30+
- name: Test insiders
31+
run: |
32+
npm ci
33+
npx hereby configure-insiders
34+
npm test
35+
36+
publish:
37+
needs: test
38+
1939
runs-on: ubuntu-latest
2040
if: github.repository == 'microsoft/TypeScript'
2141

@@ -36,8 +56,6 @@ jobs:
3656
npm ci
3757
npx hereby configure-insiders
3858
npx hereby LKG
39-
npx hereby runtests-parallel
40-
npx hereby clean
4159
npm publish --tag insiders
4260
env:
4361
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/nightly.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,26 @@ defaults:
1616
shell: bash
1717

1818
jobs:
19-
build:
19+
test:
20+
runs-on: ubuntu-latest
21+
if: github.repository == 'microsoft/TypeScript'
22+
23+
steps:
24+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
26+
- run: |
27+
npm --version
28+
# corepack enable npm
29+
npm install -g $(jq -r '.packageManager' < package.json)
30+
npm --version
31+
- name: Setup and publish nightly
32+
run: |
33+
npm ci
34+
npx hereby configure-nightly
35+
npm test
36+
37+
publish:
38+
needs: [test]
2039
runs-on: ubuntu-latest
2140
if: github.repository == 'microsoft/TypeScript'
2241

@@ -37,8 +56,6 @@ jobs:
3756
npm ci
3857
npx hereby configure-nightly
3958
npx hereby LKG
40-
npx hereby runtests-parallel
41-
npx hereby clean
4259
npm publish --tag next
4360
env:
4461
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

azure-pipelines.release.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ extends:
2828
- stage: buildStage
2929
displayName: Build Stage
3030
jobs:
31-
- job: build
32-
displayName: Build
31+
- job: test
32+
displayName: Test
3333
steps:
3434
- checkout: self
3535
clean: true
@@ -52,6 +52,28 @@ extends:
5252
- script: 'npm test'
5353
displayName: 'npm test'
5454

55+
- job: build
56+
displayName: Build
57+
dependsOn: test
58+
steps:
59+
- checkout: self
60+
clean: true
61+
fetchDepth: 1
62+
fetchTags: false
63+
64+
- task: NodeTool@0
65+
inputs:
66+
versionSpec: 20.x
67+
displayName: 'Install Node'
68+
69+
- script: |
70+
npm install -g `node -e 'console.log(JSON.parse(fs.readFileSync("package.json", "utf8")).packageManager)'`
71+
npm --version
72+
displayName: 'Install packageManager from package.json'
73+
74+
- script: npm ci
75+
displayName: 'npm ci'
76+
5577
- script: |
5678
npx hereby LKG
5779
npx hereby clean

0 commit comments

Comments
 (0)