Skip to content

Merge pull request #990 from argos-ci/987-support-no-github-repo-link… #1673

Merge pull request #990 from argos-ci/987-support-no-github-repo-link…

Merge pull request #990 from argos-ci/987-support-no-github-repo-link… #1673

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-npm
- name: Lint
run: npm run lint
- name: Check types
run: npm exec turbo run check-types
- name: Check Prettier
run: npm exec prettier --check .
unit-test:
runs-on: ubuntu-latest
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@v3
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-npm
- name: Build
run: npm run build
- name: Run unit tests
run: npm exec vitest -- -c vitest.unit.config.ts
integration-test:
runs-on: ubuntu-latest
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
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
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
rabbit:
image: rabbitmq:3-alpine
ports:
- 5672:5672
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-npm
- name: Build
run: npm run build
- name: Setup
run: npm run setup
- name: Test
run: npm exec vitest -- -c vitest.e2e.config.ts
e2e-test:
runs-on: ubuntu-latest
services:
redis:
image: redis:6-alpine
ports:
- 6379:6379
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
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
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@v3
- name: Setup Node.js & install dependencies
uses: ./.github/actions/setup-npm
- name: Setup
run: npm run setup
- name: Truncate and seed database
run: npm run e2e:setup
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run Playwright tests
run: npm exec playwright test
- name: Run Argos
continue-on-error: true
if: ${{ always() }}
run: npm exec argos upload screenshots