chore(apps/whale-api): support whale test suite for defid ocean #8672
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 ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run compile | |
- run: npm run all:build | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
instance: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] | |
env: | |
GH_INSTANCE_TOTAL: 10 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run compile | |
- run: npm run ci:test | |
env: | |
GH_INSTANCE_INDEX: ${{ matrix.instance }} | |
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
with: | |
fail_ci_if_error: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
docker-sanity: | |
needs: [ build, lint ] | |
name: Docker Sanity Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run compile | |
- run: npm run sanity | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run compile | |
- run: npx --no-install eslint . | |
docker-buildx: | |
name: Docker Buildx | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [ linux/amd64 ] | |
app: [ legacy-api, playground-api, status-api, whale-api ] | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0 | |
- name: Build platforms | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 | |
with: | |
push: false | |
build-args: APP=${{ matrix.app }} | |
platforms: ${{ matrix.platform }} | |
tags: ghcr.io/birthdayresearch/${{ matrix.app }}:latest |