Skip to content

feat: inline and no-fork execution modes #341

feat: inline and no-fork execution modes

feat: inline and no-fork execution modes #341

Workflow file for this run

name: Build and Test
on:
push:
branches: [master]
pull_request:
branches: [master]
paths-ignore:
- "README.md"
- "CONTRIBUTING.md"
- "LICENSE.md"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Build project
run: yarn build
format-check:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run format checker
run: yarn format:check
lint:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run linter
run: yarn lint
test:
runs-on: ubuntu-latest
needs: build
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
mysql:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
options: >-
--health-cmd="mysqladmin ping -h localhost -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=5
mongodb:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd="mongosh --eval 'db.adminCommand(\"ping\")'"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run tests
env:
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres
MYSQL_URL: mysql://root:root@127.0.0.1:3306/test
MONGODB_URL: mongodb://127.0.0.1:27017/test
run: yarn test:all:ci
integration-test:
runs-on: ubuntu-latest
needs: build
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run integration tests
env:
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres
run: yarn test:integration:ci