Merge pull request #1400 from argos-ci/fix-rediss #2726
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] | |
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: pnpm exec -- turbo run build --filter=\!@argos/frontend | |
- name: Lint | |
run: pnpm run lint | |
- name: Check types | |
run: pnpm run check-types | |
- name: Check Prettier | |
run: pnpm run check-format | |
- name: Knip | |
run: pnpm 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: pnpm exec -- turbo run build --filter=\!@argos/frontend | |
- name: Run unit tests | |
run: pnpm exec -- vitest -c vitest.unit.config.mts | |
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: pnpm run setup | |
env: | |
BUILD_MODE: production | |
- name: Test | |
run: npm exec -- vitest -c vitest.e2e.config.mts | |
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: pnpm run setup | |
env: | |
BUILD_MODE: production | |
- name: Truncate and seed database | |
run: pnpm run e2e:setup | |
- name: Run Playwright tests | |
uses: docker://mcr.microsoft.com/playwright:v1.47.2-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 |