Skip to content

[TM-1452] Site polygon filtering #95

[TM-1452] Site polygon filtering

[TM-1452] Site polygon filtering #95

Workflow file for this run

name: Pull Request
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
on:
pull_request:
permissions:
actions: read
contents: read
jobs:
build-lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.29.1'
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
- run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci --legacy-peer-deps
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t lint build
- run: |
docker-compose up -d
cat <<- SQL | docker-compose exec -T mariadb mysql -h localhost -u root -proot
drop database if exists terramatch_microservices_test;
create database terramatch_microservices_test;
grant all on terramatch_microservices_test.* to 'wri'@'%';
SQL
NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t test --projects database
NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t test --coverage --passWithNoTests
# First run just the small database test to get the test database synced to the current schema
# in a clean way. For some reason, the `run-many` is necessary here. If this line simply uses
# nx test database, the connection to the DB gets cut off before the sync is complete.
# - run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t test --projects database
#
# - run: NX_CLOUD_DISTRIBUTED_EXECUTION=false npx nx run-many -t test --coverage --passWithNoTests