Skip to content

Build and Test

Build and Test #7075

name: Build and Test
run-name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- "**"
merge_group:
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-and-the-default-behavior
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build-and-Test:
env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
runs-on:
labels: ubuntu-latest-l
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: admin
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 200ms
--health-timeout 200ms
--health-retries 10
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- run: "yarn install"
- name: "Check that yarn install did not cause changes to yarn.lock"
run: "git diff --quiet -- yarn.lock"
- run: "yarn check-references"
- run: "yarn build"
- run: "yarn lint"
- run: "yarn test:ci"
- name: "Test that template package works out-of-the-box"
run: "yarn turbo run test-generated-package --filter='//'"