diff --git a/.github/workflows/nestjs-mongoose-ci.yml b/.github/workflows/nestjs-mongoose-ci.yml new file mode 100644 index 0000000..1376cbb --- /dev/null +++ b/.github/workflows/nestjs-mongoose-ci.yml @@ -0,0 +1,55 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: nestjs-mongoose CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +defaults: + run: + working-directory: ./nestjs-mongoose + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache node_modules + id: deps_cache + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-build-${{ hashFiles( '**/yarn.lock' ) }} + - name: Setup yarn + run: npm install -g yarn + - name: Install dependencies + if: steps.deps_cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile + - name: Run build + run: yarn build + scan: + runs-on: ubuntu-latest + needs: + - build-and-test + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache node_modules + uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-build-${{ hashFiles( '**/yarn.lock' ) }} + - name: Setup yarn + run: npm install -g yarn + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Qodana Scan + uses: JetBrains/qodana-action@v4.2.5 + with: + linter: jetbrains/qodana-js + changes: true