[pull] master from backstage:master #1350
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify Master Branch on Windows | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
paths: | |
- '.github/workflows/verify_windows.yml' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20.x, 22.x] | |
env: | |
CI: true | |
NODE_OPTIONS: --max-old-space-size=8192 --no-node-snapshot | |
INTEGRATION_TEST_GITHUB_TOKEN: ${{ secrets.INTEGRATION_TEST_GITHUB_TOKEN }} | |
INTEGRATION_TEST_GITLAB_TOKEN: ${{ secrets.INTEGRATION_TEST_GITLAB_TOKEN }} | |
INTEGRATION_TEST_BITBUCKET_TOKEN: ${{ secrets.INTEGRATION_TEST_BITBUCKET_TOKEN }} | |
INTEGRATION_TEST_AZURE_TOKEN: ${{ secrets.INTEGRATION_TEST_AZURE_TOKEN }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: use node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ # Needed for auth | |
# Windows file operation slowness means there's no point caching this | |
- name: yarn install | |
run: yarn install --immutable | |
- name: lint | |
run: yarn backstage-cli repo lint --successCache | |
- name: type checking and declarations | |
run: yarn tsc:full | |
- name: verify type dependencies | |
run: yarn lint:type-deps | |
- name: test | |
run: yarn backstage-cli repo test --maxWorkers=3 --workerIdleMemoryLimit=1300M --successCache | |
env: | |
BACKSTAGE_TEST_DISABLE_DOCKER: 1 | |
# credit: https://github.com/appleboy/discord-action/issues/3#issuecomment-731426861 | |
- name: Discord notification | |
if: ${{ failure() }} | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
run: | | |
$MESSAGE=@" | |
{\"content\": \"Windows master build failed https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}\"} | |
"@ | |
C:\msys64\usr\bin\curl.exe -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST $env:DISCORD_WEBHOOK --data $MESSAGE |