Skip to content

feat: start with hydrated token instance #185

feat: start with hydrated token instance

feat: start with hydrated token instance #185

Workflow file for this run

name: Test API
on:
push:
paths:
- 'packages/api/**'
branches-ignore:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
MONGO_CACHE_PATH: ~/.cache/mongodb-binaries
MONGO_BINARY: mongod-x86_64-ubuntu-8.0.4
MONGOMS_VERSION: 8.0.4
# the download url is used for keying our cache so we have to force an archecture/os/os version/mongo version
MONGOMS_DOWNLOAD_URL: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.4.tgz
jobs:
test_api:
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.get_version.outputs.package_version }}
permissions:
contents: read
steps:
# cache download ./node_modules/.cache
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Cache Mongo Binary
uses: actions/cache@v4
with:
path: ${{ env.MONGO_CACHE_PATH }}/${{ env.MONGO_BINARY }}
key: ${{ env.MONGO_BINARY }}
- name: Node Modules
run: npm ci
- name: Lint Code
run: npm -w packages/api run lint
- name: Prune Dead Code
run: npm run prune -w packages/api
- name: Unit Test
run: npm run test -w packages/api
build_api:
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.get_version.outputs.package_version }}
permissions:
contents: read
steps:
# cache download ./node_modules/.cache
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: npm ci
- run: npm run build -w packages/api