diff --git a/.github/workflows/pr-pipeline.yml b/.github/workflows/pr-pipeline.yml new file mode 100644 index 0000000..fb30270 --- /dev/null +++ b/.github/workflows/pr-pipeline.yml @@ -0,0 +1,15 @@ +name: PR pipeline + +on: + pull_request: + branches: + - develop + +jobs: + ci-cd: + uses: HSLdevcom/transitdata-shared-workflows/.github/workflows/ci-cd-typescript.yml@main + with: + checkAndTestInsideDocker: true + checkAndTestOutsideDocker: false + performRelease: false + secrets: inherit diff --git a/Dockerfile b/Dockerfile index 07a41eb..f6c1aba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ +<<<<<<< Updated upstream FROM node:16-bullseye-slim +======= +FROM node:18-bullseye-slim AS base +>>>>>>> Stashed changes ENV WORK=/opt/hsl-map-server ENV DATA_DIR=${WORK}/data @@ -27,6 +31,13 @@ RUN yarn install && yarn cache clean COPY . ${WORK} +# tester stage: run linting checks; exits non-zero if linting fails +FROM base AS tester +RUN yarn eslint . + +# production stage: download map data and expose the server +FROM base AS production + RUN mkdir -p ${DATA_DIR} # OpenMapTiles dataset generated by hsldevcom