fix: do not eat new lines #26
Workflow file for this run
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: Test | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
main: | |
name: Handover Bot | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 20 | |
services: | |
postgres: | |
image: cimg/postgres:14.2 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
# set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres | |
PORT: 9621 | |
SLACK_APP_TOKEN: XXXX-X-XXXXXXXXXXX-XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
SLACK_BOT_TOKEN: XXXX-XXXXXXXXXXXXX-XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXX | |
SLACK_SIGNING_SECRET: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
HANDOVER_CHANNEL: XXXXXXXXXXX | |
HANDOVER_TITLE: Dev Handover | |
OPENAI_API_KEY: XX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Generate DB Types | |
run: pnpm exec prisma generate | |
- name: Check Code Formatting | |
run: pnpm exec xo | |
- name: Typescript | |
run: pnpm exec tsc | |
- name: Migrate Database | |
run: pnpm exec prisma db push | |
- name: Tests | |
run: pnpm exec vitest --watch=false |