ci: add -next suffix when manually publishing docker image #416
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: checks | |
on: | |
push: | |
branches: [main, release/*, next] | |
pull_request: | |
types: [synchronize, opened, reopened] | |
jobs: | |
packages: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build-packages | |
- name: Test | |
env: | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
run: yarn test-packages | |
- uses: codecov/codecov-action@v1 | |
if: ${{ matrix.node-version == '18.x' }} # run this step only one time | |
with: | |
file: ./coverage/coverage-final.json | |
- name: Lint | |
if: ${{ matrix.node-version == '18.x' }} # run this step only one time | |
run: yarn lint-packages | |
website: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: ./apps/website | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
service: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: ./apps/service | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start mock services | |
run: yarn start:mock-services -d | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- name: Test | |
run: yarn test | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: ./service/coverage/coverage-final.json | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
- name: Stop mock services | |
if: always() | |
run: yarn stop:mock-services | |
platform: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: ./apps/platform | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start mock services | |
run: yarn start:mock-services -d | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn | |
- name: Build image | |
env: | |
INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: yarn build:image | |
- name: Start containers | |
run: yarn start:platform && yarn start:platform-no-website | |
- name: Lint | |
run: yarn lint | |
- name: Test | |
run: yarn test | |
- name: Stop containers | |
if: always() | |
run: yarn stop:platform && yarn stop:platform-no-website | |
- name: Stop mock services | |
if: always() | |
run: yarn stop:mock-services |