bump (#294) #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test backend | |
on: | |
push: | |
paths: | |
- 'packages/backend/**' | |
- 'packages/shared/**' | |
- 'packages/package.json' | |
branches: [ main ] | |
pull_request: | |
paths: | |
- 'packages/backend/**' | |
- 'packages/shared/**' | |
branches: [ main ] | |
env: | |
WORKSPACE_NAME: mzm-backend | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo:5 | |
ports: | |
- 27017:27017 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: password | |
options: >- | |
--health-cmd mongo | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npx concurrently "npm run build -w ${{ env.WORKSPACE_NAME }}" "npm run lint -w ${{ env.WORKSPACE_NAME }}" "npm run build:test -w ${{ env.WORKSPACE_NAME }}" | |
- run: npm run test:ci -w ${{ env.WORKSPACE_NAME }} | |
env: | |
CI: true | |
TEST_MONGODB_PORT: 27017 | |
TEST_MONGO_ROOT_USER: root | |
TEST_MONGO_ROOT_PASSWORD: password | |
TEST_REDIS_PORT: 6379 | |
- name: test docker build | |
uses: docker/build-push-action@v2 | |
with: | |
file: packages/backend/Dockerfile | |
context: . | |
push: false |