Skip to content

Commit

Permalink
ci: test fetch-engine & get-platform & engines packages (#14121)
Browse files Browse the repository at this point in the history
* ci: test fetch-engine & get-platform & engines packages

Looks like we missed that during review of #13769

Closes prisma/engines-wrapper#141

* update FIXED_BINARIES_HASH

* update snapshots

* describeIf for node-api test

* simple describeIf

* debug windows test failure

* path.posix.join

* add mxschmitt/action-tmate@v3

* fix beforeEach del for windows

* merge/remove node-api test + rename

* code suggestion
  • Loading branch information
Jolg42 committed Jul 6, 2022
1 parent 3c9a979 commit 9a3435d
Show file tree
Hide file tree
Showing 6 changed files with 420 additions and 309 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -602,6 +602,48 @@ jobs:
flags: generator-helper,${{ matrix.os }},library,binary
name: generator-helper-${{ matrix.os }}

- run: pnpm run test
name: 'get-platform'
working-directory: packages/get-platform
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}

- uses: codecov/codecov-action@v3
with:
files: ./packages/get-platform/src/__tests__/coverage/clover.xml
flags: get-platform,${{ matrix.os }},library,binary
name: get-platform-${{ matrix.os }}

- run: pnpm run test
name: 'fetch-engine'
working-directory: packages/fetch-engine
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}

- uses: codecov/codecov-action@v3
with:
files: ./packages/fetch-engine/src/__tests__/coverage/clover.xml
flags: fetch-engine,${{ matrix.os }},library,binary
name: fetch-engine-${{ matrix.os }}

- run: pnpm run test
name: 'engines'
working-directory: packages/engines
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}

- uses: codecov/codecov-action@v3
with:
files: ./packages/engines/src/__tests__/coverage/clover.xml
flags: engines,${{ matrix.os }},library,binary
name: engines-${{ matrix.os }}

#
# Run all tests on macOS and Windows.
#
Expand Down Expand Up @@ -789,6 +831,57 @@ jobs:
flags: generator-helper,${{ matrix.os }},library,binary
name: generator-helper-${{ matrix.os }}

- name: Test packages/get-platform
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
run: pnpm run test
working-directory: packages/get-platform
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}
JEST_JUNIT_SUITE_NAME: '${{ github.job }}/get-platform/${{ matrix.os }}/node-${{ matrix.node }}/${{ matrix.queryEngine }}'

- uses: codecov/codecov-action@v3
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
with:
files: ./packages/get-platform/src/__tests__/coverage/clover.xml
flags: get-platform,${{ matrix.os }},library,binary
name: get-platform-${{ matrix.os }}

- name: Test packages/fetch-engine
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
run: pnpm run test
working-directory: packages/fetch-engine
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}
JEST_JUNIT_SUITE_NAME: '${{ github.job }}/fetch-engine/${{ matrix.os }}/node-${{ matrix.node }}/${{ matrix.queryEngine }}'

- uses: codecov/codecov-action@v3
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
with:
files: ./packages/fetch-engine/src/__tests__/coverage/clover.xml
flags: fetch-engine,${{ matrix.os }},library,binary
name: fetch-engine-${{ matrix.os }}

- name: Test packages/engines
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
run: pnpm run test
working-directory: packages/engines
env:
CI: true
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}
JEST_JUNIT_SUITE_NAME: '${{ github.job }}/engines/${{ matrix.os }}/node-${{ matrix.node }}/${{ matrix.queryEngine }}'

- uses: codecov/codecov-action@v3
if: ${{ contains(needs.detect_jobs_to_run.outputs.jobs, '-all-') }}
with:
files: ./packages/engines/src/__tests__/coverage/clover.xml
flags: engines,${{ matrix.os }},library,binary
name: engines-${{ matrix.os }}

- name: Upload test results to BuildPulse for flaky test detection
# Only run this step for branches where where we have access to secrets.
# Run this step even when the tests fail. Skip if the workflow is cancelled.
Expand Down
6 changes: 6 additions & 0 deletions packages/engines/.gitignore
@@ -0,0 +1,6 @@
node_modules
query-engine*
libquery_engine*
introspection-engine*
migration-engine*
prisma-fmt*

0 comments on commit 9a3435d

Please sign in to comment.