Publish #688
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: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
static: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: 20 | |
- name: Lint | |
run: npm run lint | |
- name: Check format | |
run: npm run check-format | |
- name: Check types | |
run: npm run check-types | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: 20 | |
- name: Build | |
run: npm run build | |
- name: Upload "@argos-ci/util" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Upload "@argos-ci/cli" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Upload "@argos-ci/core" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Upload "@argos-ci/api-client" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Upload "@argos-ci/browser" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: browser-dist | |
path: packages/browser/dist | |
- name: Upload "@argos-ci/playwright" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-dist | |
path: packages/playwright/dist | |
- name: Upload "@argos-ci/cypress" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-dist | |
path: packages/cypress/dist | |
- name: Upload "@argos-ci/puppeteer" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: puppeteer-dist | |
path: packages/puppeteer/dist | |
- name: Upload "@argos-ci/webdriverio" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: webdriverio-dist | |
path: packages/webdriverio/dist | |
- name: Upload "@argos-ci/storybook" dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: storybook-dist | |
path: packages/storybook/dist | |
unit: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18, 20, 22] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Test | |
run: npm run test | |
e2e-core: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18, 20, 22] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Run integration tests | |
run: pnpm --filter core --filter cli run e2e | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} | |
e2e-cypress: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [current] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Cypress | |
run: pnpm --filter cypress exec cypress install | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Download "@argos-ci/browser" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: browser-dist | |
path: packages/browser/dist | |
- name: Download "@argos-ci/cypress" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cypress-dist | |
path: packages/cypress/dist | |
- name: Run integration tests | |
run: pnpm --filter cypress run e2e | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} | |
e2e-playwright: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [current] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Playwright | |
run: pnpm --filter playwright exec playwright install chromium --with-deps | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Download "@argos-ci/browser" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: browser-dist | |
path: packages/browser/dist | |
- name: Download "@argos-ci/playwright" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: playwright-dist | |
path: packages/playwright/dist | |
- name: Run integration tests | |
run: pnpm --filter playwright run e2e | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} | |
e2e-puppeteer: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [current] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Puppeteer | |
run: node packages/puppeteer/node_modules/puppeteer/install.mjs | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Download "@argos-ci/browser" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: browser-dist | |
path: packages/browser/dist | |
- name: Download "@argos-ci/puppeteer" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: puppeteer-dist | |
path: packages/puppeteer/dist | |
- name: Run integration tests | |
run: pnpm --filter puppeteer run e2e | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} | |
e2e-webdriverio: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Download "@argos-ci/webdriverio" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: webdriverio-dist | |
path: packages/webdriverio/dist | |
- name: Run integration tests | |
run: pnpm --filter webdriverio run e2e | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} | |
e2e-storybook: | |
needs: ["build"] | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [current] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup deps | |
uses: ./.github/actions/setup-deps | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Download "@argos-ci/storybook" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: storybook-dist | |
path: packages/storybook/dist | |
- name: Download "@argos-ci/cli" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: cli-dist | |
path: packages/cli/dist | |
- name: Download "@argos-ci/core" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: core-dist | |
path: packages/core/dist | |
- name: Download "@argos-ci/util" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: util-dist | |
path: packages/util/dist | |
- name: Download "@argos-ci/api-client" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-client-dist | |
path: packages/api-client/dist | |
- name: Download "@argos-ci/playwright" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: playwright-dist | |
path: packages/playwright/dist | |
- name: Download "@argos-ci/browser" dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: browser-dist | |
path: packages/browser/dist | |
- name: Build Storybook | |
run: pnpm run --filter storybook -- build-storybook --quiet | |
- name: Setup Playwright | |
run: pnpm --filter storybook exec playwright install chromium --with-deps | |
- name: Server Storybook and run integration tests | |
run: | | |
pnpm dlx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
"pnpm dlx http-server packages/storybook/storybook-static --port 6006 --silent" \ | |
"pnpm dlx wait-on tcp:127.0.0.1:6006 && pnpm --filter storybook run e2e" | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
NODE_VERSION: ${{ matrix.node-version }} | |
OS: ${{ matrix.os }} |