mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-05 12:27:30 +03:00
Update GitHub Actions from "actions" org & update mypy_primer for changed upload-artifacts behaviour (#7978)
* Update actions/checkout, actions/setup-node, actions/setup-python, actions/github-script * Update actions/upload-artifact & actions/download-artifact includign migrations
This commit is contained in:
parent
a18387f1c4
commit
766a012627
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -17,11 +17,11 @@ jobs:
|
||||
name: Build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
@ -46,7 +46,7 @@ jobs:
|
||||
npm run package
|
||||
mv pyright-*.vsix ${{ env.VSIX_NAME }}
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME_VSIX }}
|
||||
path: packages/vscode-pyright/${{ env.VSIX_NAME }}
|
||||
@ -61,7 +61,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
27
.github/workflows/mypy_primer_comment.yaml
vendored
27
.github/workflows/mypy_primer_comment.yaml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Download diffs
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
@ -30,24 +30,27 @@ jobs:
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{ github.event.workflow_run.id }},
|
||||
});
|
||||
const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>
|
||||
artifact.name == "mypy_primer_diffs");
|
||||
const matchedArtifacts = artifacts.data.artifacts.filter((artifact) =>
|
||||
artifact.name.startsWith("mypy_primer_diffs"));
|
||||
|
||||
const download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
archive_format: "zip",
|
||||
});
|
||||
fs.writeFileSync("diff.zip", Buffer.from(download.data));
|
||||
for (let i = 0; i < matchedArtifacts.length; i++) {
|
||||
const matchArtifact = matchedArtifacts[i];
|
||||
const download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
archive_format: "zip",
|
||||
});
|
||||
fs.writeFileSync(`diff_${i}.zip`, Buffer.from(download.data));
|
||||
}
|
||||
|
||||
- run: unzip diff.zip
|
||||
- run: unzip diff_\*.zip
|
||||
- run: |
|
||||
cat diff_*.txt | tee fulldiff.txt
|
||||
|
||||
- name: Post comment
|
||||
id: post-comment
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
|
16
.github/workflows/mypy_primer_pr.yaml
vendored
16
.github/workflows/mypy_primer_pr.yaml
vendored
@ -38,11 +38,11 @@ jobs:
|
||||
shard-index: [0, 1]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: pyright_to_test
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
@ -75,17 +75,17 @@ jobs:
|
||||
| tee diff_${{ matrix.shard-index }}.txt
|
||||
) || [ $? -eq 1 ]
|
||||
- name: Upload mypy_primer diff
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mypy_primer_diffs
|
||||
name: mypy_primer_diffs_${{ matrix.shard-index }}
|
||||
path: diff_${{ matrix.shard-index }}.txt
|
||||
- if: ${{ matrix.shard-index }} == 0
|
||||
- if: ${{ matrix.shard-index == 0 }}
|
||||
name: Save PR number
|
||||
run: |
|
||||
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
|
||||
- if: ${{ matrix.shard-index }} == 0
|
||||
- if: ${{ matrix.shard-index == 0 }}
|
||||
name: Upload PR number
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mypy_primer_diffs
|
||||
name: mypy_primer_diffs_pr_number
|
||||
path: pr_number.txt
|
||||
|
6
.github/workflows/mypy_primer_push.yaml
vendored
6
.github/workflows/mypy_primer_push.yaml
vendored
@ -29,11 +29,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: pyright_to_test
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
| tee diff.txt
|
||||
) || [ $? -eq 1 ]
|
||||
- name: Upload mypy_primer diff
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mypy_primer_diffs
|
||||
path: diff.txt
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -15,9 +15,9 @@ jobs:
|
||||
name: Publish extension to marketplace
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
|
18
.github/workflows/validation.yml
vendored
18
.github/workflows/validation.yml
vendored
@ -19,9 +19,9 @@ jobs:
|
||||
name: Typecheck
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
@ -47,9 +47,9 @@ jobs:
|
||||
name: Style
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
@ -83,9 +83,9 @@ jobs:
|
||||
needs: typecheck
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
@ -113,7 +113,7 @@ jobs:
|
||||
|
||||
# Install python so we can create a VENV for tests
|
||||
- name: Use Python ${{env.PYTHON_VERSION}}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
id: install_python
|
||||
with:
|
||||
python-version: ${{env.PYTHON_VERSION}}
|
||||
@ -159,9 +159,9 @@ jobs:
|
||||
needs: typecheck
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user