Avoid testing in same CI jobs as releases (#58002)

This commit is contained in:
Jake Bailey
2024-03-29 15:24:49 -07:00
committed by GitHub
parent e256ec1bff
commit db35774f9f
3 changed files with 65 additions and 8 deletions

View File

@@ -15,7 +15,27 @@ defaults:
shell: bash
jobs:
build:
test:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- run: |
npm --version
# corepack enable npm
npm install -g $(jq -r '.packageManager' < package.json)
npm --version
- name: Test insiders
run: |
npm ci
npx hereby configure-insiders
npm test
publish:
needs: test
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'
@@ -36,8 +56,6 @@ jobs:
npm ci
npx hereby configure-insiders
npx hereby LKG
npx hereby runtests-parallel
npx hereby clean
npm publish --tag insiders
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

View File

@@ -16,7 +16,26 @@ defaults:
shell: bash
jobs:
build:
test:
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- run: |
npm --version
# corepack enable npm
npm install -g $(jq -r '.packageManager' < package.json)
npm --version
- name: Setup and publish nightly
run: |
npm ci
npx hereby configure-nightly
npm test
publish:
needs: [test]
runs-on: ubuntu-latest
if: github.repository == 'microsoft/TypeScript'
@@ -37,8 +56,6 @@ jobs:
npm ci
npx hereby configure-nightly
npx hereby LKG
npx hereby runtests-parallel
npx hereby clean
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}