upcoming: [M3-9421] - Add API endpoints and types for /v4/nodebalancers
#23579
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: | |
- master | |
- staging | |
- develop | |
pull_request: | |
jobs: | |
lint: | |
strategy: | |
matrix: | |
package: | |
[ | |
"linode-manager", | |
"@linode/api-v4", | |
"@linode/validation", | |
"@linode/ui", | |
"@linode/utilities", | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter ${{ matrix.package }} lint | |
build-validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/validation build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
test-sdk: | |
runs-on: ubuntu-latest | |
needs: build-validation | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- run: pnpm run --filter @linode/api-v4 test | |
build-sdk: | |
runs-on: ubuntu-latest | |
needs: build-validation | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/api-v4 build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
validate-sdk: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
# Download the validation and api-v4 artifacts (built packages) | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
# Create an api-v4 tarball | |
- run: cd packages/api-v4 && pnpm pack --pack-destination ../../ | |
# Create an validation tarball | |
- run: cd packages/validation && pnpm pack --pack-destination ../../ | |
# Test @linode/api-v4 as an ES Module | |
- run: mkdir test-sdk-esm && cd test-sdk-esm && npm init es6 -y && npm install ../$(ls ../ | grep "linode-api-v4-.*\.tgz") ../$(ls ../ | grep "linode-validation-.*\.tgz") | |
- run: cp scripts/validatePackages/sdk-esm.js test-sdk-esm/ | |
- run: cd test-sdk-esm && node ./sdk-esm.js | |
# Verify @linode/api-v4 as CommonJS | |
- run: mkdir test-sdk-cjs && cd test-sdk-cjs && npm init -y && npm install ../$(ls ../ | grep "linode-api-v4-.*\.tgz") ../$(ls ../ | grep "linode-validation-.*\.tgz") | |
- run: cp scripts/validatePackages/sdk-commonjs.cjs test-sdk-cjs/ | |
- run: cd test-sdk-cjs && node ./sdk-commonjs.cjs | |
test-manager: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter linode-manager test | |
test-search: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/search test | |
test-ui: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/ui test | |
test-utilities: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/utilities test | |
typecheck-ui: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/ui typecheck | |
typecheck-utilities: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter @linode/utilities typecheck | |
typecheck-manager: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter linode-manager typecheck | |
publish-packages: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: | |
- build-sdk | |
- build-validation | |
- test-sdk | |
- validate-sdk | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- run: pnpm install --frozen-lockfile | |
- run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: pnpm publish -r --filter @linode/api-v4 --filter @linode/validation --no-git-checks --access public | |
- name: slack-notify | |
uses: rtCamp/action-slack-notify@master | |
env: | |
SLACK_CHANNEL: api-js-client | |
SLACK_TITLE: "Packages published" | |
SLACK_MESSAGE: ":rocket: Linode packages have been published!" | |
SLACK_USERNAME: npm-bot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_ICON_EMOJI: ":package:" | |
build-storybook: | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
cache: "pnpm" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-validation-lib | |
path: packages/validation/lib | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages-api-v4-lib | |
path: packages/api-v4/lib | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run --filter linode-manager build-storybook | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: storybook-build | |
path: packages/manager/storybook-static | |
publish-storybook: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
needs: build-storybook | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: storybook-build | |
path: storybook/build | |
- uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_ENDPOINT: https://us-east-1.linodeobjects.com | |
AWS_S3_BUCKET: ${{ secrets.STORYBOOK_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: us-east-1 | |
SOURCE_DIR: storybook/build |