Skip to content
Open
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
88 changes: 88 additions & 0 deletions .github/workflows/post-beta-long-running.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Post-Beta Long Running Tests
run-name: Long Running Tests for ${{ github.event.release.tag_name }}

on:
release:
types: [published]

permissions:
contents: read

jobs:
check-beta-release:
runs-on: ubuntu-latest
outputs:
is-beta: ${{ steps.check.outputs.is-beta }}
steps:
- name: Check if beta release
id: check
run: |
TAG="${{ github.event.release.tag_name }}"
if [[ "$TAG" =~ -beta$ ]]; then
echo "is-beta=true" >> $GITHUB_OUTPUT
else
echo "is-beta=false" >> $GITHUB_OUTPUT
fi

long-running-tests:
needs: check-beta-release
if: needs.check-beta-release.outputs.is-beta == 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18, 20, 22]
runs-on: ${{ matrix.os }}
timeout-minutes: 360
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.release.tag_name }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Download release standalone
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${{ github.event.release.tag_name }}"
case "${{ matrix.os }}" in
ubuntu-latest) PLATFORM="linux" ;;
windows-latest) PLATFORM="win32" ;;
macos-latest) PLATFORM="darwin" ;;
esac
PATTERN="*${PLATFORM}*x64*node${{ matrix.node-version }}*.zip"
gh release download "$TAG" --pattern "$PATTERN"

- name: Extract standalone bundle
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
unzip *.zip
else
unzip *.zip
chmod +x cfn-lsp-server-standalone.js
fi

- name: Test standalone bundle
run: node cfn-lsp-server-standalone.js --version

- name: Install dependencies
run: npm ci

- name: Run long-running stability tests
env:
STABILITY_TEST_DURATION: 4h
STANDALONE_PATH: ./cfn-lsp-server-standalone.js
run: npm run test:stability

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: long-running-test-results-${{ matrix.os }}
path: |
test-results.json
test-logs.txt
if-no-files-found: ignore
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*.node
.DS_Store
tools/*
!tools/*.ts
!tools/*/
!tools/**/*.ts
**/.aws-cfn-storage
/oss-attribution
/tmp-tst
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"test:integration": "cross-env NODE_ENV=test vitest run --config vitest.integration.config.ts",
"test:unit": "cross-env NODE_ENV=test vitest run --config vitest.unit.config.ts",
"test:leaks": "cross-env NODE_ENV=test vitest run --pool=forks --logHeapUsage",
"test:stability": "cross-env NODE_ENV=test tsx tools/stability/runStabilityTest.ts",
"lint": "eslint --cache --cache-location node_modules/.cache/eslint --max-warnings 0 .",
"lint:fix": "npm run lint -- --fix",
"build:go:dev": "GOPROXY=direct go build -C cfn-init/cmd -v -o ../../bundle/development/bin/cfn-init",
Expand Down
Loading
Loading