fix(dependency maintenance): update dependency class-transformer to v0.5.1 #12071
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
quality: | |
name: Quality | |
if: "!contains(github.event.head_commit.message, 'chore(release):')" | |
runs-on: ubuntu-20.04 | |
env: | |
AWS_ACCESS_KEY_ID: dummy | |
AWS_SECRET_ACCESS_KEY: dummy | |
services: | |
mongo: | |
image: mongo | |
ports: | |
- 27017:27017 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
localstack: | |
image: localstack/localstack | |
ports: | |
- 4566:4566 | |
env: | |
SERVICES: s3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16.x" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Format | |
run: npm run format:check | |
# We need execute the script manually because the code is mounted after the container is created | |
- name: Create s3 bucket on localstack | |
run: docker exec ${{job.services.localstack.id}} bash -c "`cat aws/bucket.sh`" | |
- name: Tests | |
run: npm test | |
- name: Prod build | |
run: npm run build | |
release: | |
name: Release | |
needs: quality | |
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'chore(release):') | |
runs-on: ubuntu-20.04 | |
env: | |
CACHE_IMAGE: sanofiiadc/whispr | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16.x" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Log into Docker registry | |
uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.SANOFI_DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.SANOFI_DOCKER_HUB_TOKEN }} | |
- name: Pull Docker cache image | |
run: docker pull --quiet ${CACHE_IMAGE} 2>/dev/null || true | |
- name: Semantic Release | |
env: | |
MDF_BRANCH_TAG: latest | |
MDF_BUILD_PARAMS: --cache-from ${{ env.CACHE_IMAGE }} | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
run: npx semantic-release |