Skip to content

chore(deps): update major (major) #615

chore(deps): update major (major)

chore(deps): update major (major) #615

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
types: [synchronize, opened, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
skip-draft:
name: skip draft
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: fail on draft
if: github.event.pull_request.draft == true
run: echo "is a draft PR, failing..." && exit 1
- name: success
run: echo "is not a draft PR"
lint:
needs: skip-draft
name: Lint
runs-on: ubuntu-latest
container: node:lts
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Typecheck
run: yarn typecheck
- name: Eslint
run: yarn lint:ci
- name: Prettier
run: yarn format:ci
tests:
needs: skip-draft
name: Test
runs-on: ubuntu-latest
container: node:lts
timeout-minutes: 10
services:
database:
image: mongo:7.0.2-jammy
env:
MONGO_INITDB_ROOT_USERNAME: acid
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: develop
options: >-
--health-cmd "echo 'dgit stb.runCommand("ping").ok' | mongosh --quiet"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
queue:
image: rabbitmq:3.12-alpine
env:
RABBITMQ_DEFAULT_USER: acid
RABBITMQ_DEFAULT_PASS: password
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 15672:15672
- 5672:5672
strategy:
matrix:
shard: [1]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Tests
run: |
yarn test:ci --shard=${{ matrix.shard }}/${{ strategy.job-total }}
env:
DB_HOST: database
DB_USERNAME: acid
DB_PASSWORD: password
DB_DATABASE: develop
QUEUE_HOST: queue
QUEUE_USERNAME: acid
QUEUE_PASSWORD: password
docker-build:
needs: skip-draft
name: Build Docker Container
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push docker image
uses: docker/[email protected]
with:
context: .
file: ./docker/Dockerfile
push: false
tags: nestjs:latest