Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/accept-baselines-fix-lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm

- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
run: |
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
npm install
npm ci
git rm -r --quiet tests/baselines/reference :^tests/baselines/reference/docker :^tests/baselines/reference/user
gulp runtests-parallel --ci --fix || true
gulp baseline-accept
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
check-latest: true
# We use all of this instead of "cache: npm" above to avoid mixing npm 6 caches with npm 8+ caches.
# TODO: Remove this once we stop running CI on Node 14.
- name: Get npm cache directory
id: npm-cache-info
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=key::$(npm --version | grep -q '^6' && echo "node14" || echo "node")"
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-info.outputs.dir }}
key: ${{ runner.os }}-${{ steps.npm-cache-info.outputs.key }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ steps.npm-cache-info.outputs.key }}-
- run: npm ci

# Re: https://github.com/actions/setup-node/pull/125
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ensure-related-repos-run-crons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "TypeScript Bot"

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: 'microsoft/TypeScript-Website'
path: 'ts-site'
Expand All @@ -34,7 +34,7 @@ jobs:
git config --unset-all http.https://github.com/.extraheader
git push https://${{ secrets.TS_BOT_GITHUB_TOKEN }}@github.com/microsoft/TypeScript-Website.git

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: 'microsoft/TypeScript-Make-Monaco-Builds'
path: 'monaco-builds'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/new-release-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5
- uses: actions/setup-node@v3
with:
cache: npm
- run: |
git checkout -b ${{ github.event.client_payload.branch_name }}
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
if: github.repository == 'microsoft/TypeScript'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
registry-url: https://registry.npmjs.org/
cache: npm
- name: Setup and publish nightly
run: |
npm whoami
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- name: npm install and test
run: |
npm ci
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/rich-navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5

- uses: actions/setup-node@v3
with:
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/set-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch_name }}
# notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists
Expand All @@ -20,6 +19,9 @@ jobs:
# branch_name - the target branch
# package_version - the full version string (eg, `3.9.1-rc` or `3.9.2`)
# core_major_minor - the major.minor pair associated with the desired package_version (eg, `3.9` for `3.9.3`)
- uses: actions/setup-node@v3
with:
cache: npm
- run: |
sed -i -e 's/"version": ".*"/"version": "${{ github.event.client_payload.package_version }}"/g' package.json
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sync-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
fetch-depth: 0
# This does a test post-merge and only pushes the result if the test succeeds
# required client_payload members:
# branch_name - the target branch
- uses: actions/setup-node@v3
with:
cache: npm
- run: |
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Get repo name
run: R=${GITHUB_REPOSITORY%?wiki}; echo "BASENAME=${R##*/}" >> $GITHUB_ENV
- name: Checkout ${{ env.BASENAME }}-wiki
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: "${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki"
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/twoslash-repros.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
cache: npm # TODO(jakebailey): No checkout; remove?
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
with:
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
Expand All @@ -36,6 +38,8 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
cache: npm
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
with:
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update-lkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm

- name: Configure Git and Update LKG
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-package-lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
if: github.repository == 'microsoft/TypeScript'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm

- name: Configure git and update package-lock.json
run: |
Expand Down