Skip to content

@/charterafrica Dockerfile migration #3026

@/charterafrica Dockerfile migration

@/charterafrica Dockerfile migration #3026

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ${{ matrix.os }}
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
MONGO_URL: ${{ secrets.MONGO_URL }}
PROMISE_TRACKER_SENTRY_DSN: ${{ secrets.PROMISE_TRACKER_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
strategy:
matrix:
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# Looks like to use pnpm cache, setup-node must run after pnpm/action-setup
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Confirm pnpm version
run: pnpm --version
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Format
run: pnpm format-check
- name: Lint
run: pnpm lint-check
- name: Jest
run: pnpm jest
# PromiseTracker seems to build success but then "hang".
# TODO(kilemensi): Investigate promisetrakcer
- name: Build
run: pnpm build --filter=promisetracker^...
- name: Playwright
run: pnpm playwright --filter=promisetracker^...