Merge pull request #1295 from weseek/dependabot/npm_and_yarn/aws-sdk/… #2770
This file contains hidden or 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: Application - Test | |
| on: | |
| push: | |
| branches-ignore: [stable] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| app-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get UID/GID | |
| id: ids | |
| run: | | |
| echo "uid=$(id -u)" >> $GITHUB_OUTPUT | |
| echo "gid=$(id -g)" >> $GITHUB_OUTPUT | |
| - uses: actions/checkout@v6 | |
| # The "docker-container" driver is used because of using cache | |
| - uses: docker/setup-buildx-action@v3 | |
| # Store the App container image in the local and Github Action cache, respectively | |
| - name: Build app container to caching (No push) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: .devcontainer | |
| build-args: | | |
| USER_UID=${{ steps.ids.outputs.uid }} | |
| USER_GID=${{ steps.ids.outputs.gid }} | |
| load: true # Save build result localy because of using cache by next steps | |
| cache-from: type=gha # Read layers from gha cache | |
| cache-to: type=gha,mode=max # Save layers as much as possible to gha cache | |
| - name: Start all DBs and middle | |
| run: | | |
| docker compose -f .devcontainer/compose.yml build --build-arg USER_UID=${{ steps.ids.outputs.uid }} --build-arg USER_GID=${{ steps.ids.outputs.gid }} | |
| docker compose -f .devcontainer/compose.yml up -d | |
| - name: Run test | |
| run: | |
| docker compose -f .devcontainer/compose.yml exec -e NODE_OPTIONS -e CI -T -- node bash -c 'yarn install && yarn test' | |
| env: | |
| # Temporarily ignore warnings | |
| # see: | |
| # * https://github.com/nodejs/node/blob/59cdd4f1c246cceb89a00c37e3c819a08444c888/doc/api/deprecations.md#dep0040-nodepunycode-module | |
| # * https://github.com/nodejs/node/pull/56632 | |
| NODE_OPTIONS: --no-deprecation | |
| - name: Show test report to result of action | |
| if: success() || failure() | |
| uses: ctrf-io/github-test-reporter@v1 | |
| with: | |
| report-path: '**/vitest-ctrf/*.json' | |
| - name: Report coverage follow the settings .octocov.yml | |
| if: success() || failure() | |
| uses: ./.github/actions/report-coverage |