Skip to content

Merge pull request #1309 from argos-ci/block-unpaid-subscription #2460

Merge pull request #1309 from argos-ci/block-unpaid-subscription

Merge pull request #1309 from argos-ci/block-unpaid-subscription #2460

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
jobs:
static-analysis:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-deps
- name: Build
run: npm exec -- turbo run build --filter=\!@argos/frontend
- name: Lint
run: npm run lint
- name: Check types
run: npm run check-types
- name: Check Prettier
run: npm run check-format
- name: Knip
run: npm run knip
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
NODE_ENV: test
TZ: utc
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-deps
- name: Build
run: npm exec -- turbo run build --filter=\!@argos/frontend
- name: Run unit tests
run: npm exec -- vitest -c vitest.unit.config.ts
integration-test:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
NODE_ENV: test
TZ: utc
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
services:
redis:
image: redis:6-alpine
ports:
- 6379:6379
# Speed up initialization by disabling health checks
# Services run during the installation of the dependencies
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
postgres:
image: postgres:14-alpine
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Speed up initialization by disabling health checks
# Services run during the installation of the dependencies
# options: >-
# --health-cmd "pg_isready"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
rabbit:
image: rabbitmq:3-alpine
ports:
- 5672:5672
# Speed up initialization by disabling health checks
# Services run during the installation of the dependencies
# options: >-
# --health-cmd "rabbitmq-diagnostics -q ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-deps
- name: Setup
run: npm run setup
env:
BUILD_MODE: production
- name: Test
run: npm exec -- vitest -c vitest.e2e.config.ts
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
API_BASE_URL: http://localhost:3000
NODE_ENV: test
TZ: utc
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
services:
redis:
image: redis:6-alpine
ports:
- 6379:6379
# Speed up initialization by disabling health checks
# Services run during the installation of the dependencies
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
postgres:
image: postgres:13-alpine
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Speed up initialization by disabling health checks
# Services run during the installation of the dependencies
# options: >-
# --health-cmd "pg_isready"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-deps
- name: Setup
run: npm run setup
env:
BUILD_MODE: production
- name: Truncate and seed database
run: npm run e2e:setup
- name: Run Playwright tests
uses: docker://mcr.microsoft.com/playwright:v1.44.0-jammy
with:
# Fix for Firefox, HOME=/root is required to avoid permission issues
# https://github.com/microsoft/playwright/issues/6500
args: env HOME=/root npm exec -- playwright test
env:
REDIS_URL: redis://redis:6379/1
DATABASE_URL: postgresql://postgres@postgres/test
CLOUDAMQP_URL: amqp://rabbitmq