Skip to content

[recnet-api] Create CI #2

[recnet-api] Create CI

[recnet-api] Create CI #2

Workflow file for this run

name: recnet-api-ci
on:
push:
branches:
- master
- recnet-api-dev
pull_request:
branches:
- recnet-api-dev
permissions:
actions: read
contents: read
jobs:
lint-test-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
# - run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: pnpm/action-setup@v2
with:
version: 8
# Cache node_modules
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- run: pnpm nx run-many -t typecheck
- run: pnpm nx run-many -t format:check
- run: pnpm nx run-many -t lint
- run: pnpm nx run-many -t test
version_bump:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.ref == 'refs/heads/recnet-api/recnet-api-dev'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract version
id: extract_version
run: |
VERSION=$(grep -o '"version": *"[^"]*"' apps/recnet-api/package.json | cut -d '"' -f 4)
echo "::set-output name=version::$VERSION"
- name: Use extracted version
run: |
echo "Extracted version: ${{ steps.extract_version.outputs.version }}"