set jest-ctrf-json-reporter #1496
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: 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: | |
# Increase workspace space | |
- name: Remove docker image | |
run: | | |
docker image prune --force --all | |
- uses: actions/checkout@v4 | |
# Pull the latest image to build, and avoid caching pull-only images. | |
# (docker pull is faster than caching in most cases.) | |
- name: Pull Docker images | |
run: docker compose -f .devcontainer/compose.yml pull | |
# This step loads "node_modules" from the cache which contains the cache of Turborepo. | |
# The "node_modules" will be mounted with the source code when `docker compose up` is executed. | |
- name: Load cache "node_modules" which includes cahce of Turborepo | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: node_modules | |
key: | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: Start all DBs and middle | |
run: | | |
docker compose -f .devcontainer/compose.yml build --build-arg USER_UID=$(id -u) --build-arg USER_GID=$(id -g) | |
docker compose -f .devcontainer/compose.yml up -d | |
- name: Run test | |
run: | |
docker compose -f .devcontainer/compose.yml exec -e NODE_OPTIONS -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: Test Report | |
# # For bug, fix version | |
# # see. https://github.com/dorny/test-reporter/issues/512#issuecomment-2550972841 | |
# uses: dorny/test-reporter@1a288b62f8b75c0f433cbfdbc2e4800fbae50bd7 | |
# if: success() || failure() # run this step even if previous step failed | |
# with: | |
# name: JEST Tests # Name of the check run which will be created | |
# path: '(apps|packages)/**/reports/report.xml' # Path to test results | |
# reporter: jest-junit # Format of test results | |
- name: Publish Test Report | |
if: success() || failure() | |
uses: ctrf-io/github-test-reporter@v1 | |
with: | |
report-path: '(apps|packages)/**/ctrf/*.json' |