Skip to content

Remove code-cov while preserving test coverage archival #2

Remove code-cov while preserving test coverage archival

Remove code-cov while preserving test coverage archival #2

name: "Integration tests (on-prem)"
on:
workflow_call:
inputs:
disable-coverage-archival:
description: "Whether or not to archive the test coverage"
required: false
default: false
type: boolean
jobs:
integration-tests:- Remove codecov from the repo

Check failure on line 13 in .github/workflows/reusable-integration-tests-on-prem.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/reusable-integration-tests-on-prem.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
- Upgrade husky (merge it)
-
strategy:
matrix:
packages:
[
{ package: "ogm", shard: 1/1, coverage_name: 1 },
{ package: "introspector", shard: 1/1, coverage_name: 2 },
{ package: "graphql", shard: 1/4, coverage_name: 3 },
{ package: "graphql", shard: 2/4, coverage_name: 4 },
{ package: "graphql", shard: 3/4, coverage_name: 5 },
{ package: "graphql", shard: 4/4, coverage_name: 6 },
]
neo4j-version:
# - 4.4-community
- 4.4-enterprise
# - 5-community
- 5-enterprise
graphql-version: [
{
version: "^15.0.0",
coverage_path: 15
},
{
package: "^16.0.0",
coverage_path: 16
}
]
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:${{ matrix.neo4j-version }}
env:
NEO4J_AUTH: neo4j/password
NEO4J_PLUGINS: '["apoc"]'
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
steps:
- name: Check out repository code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn --immutable
- name: Overwrite GraphQL version
run: yarn up --exact graphql@${{ matrix.graphql-version }}
- name: Run @neo4j/graphql integration tests and move coverage
run: |
yarn test:int --shard=${{ matrix.packages.shard }} --coverage
mv coverage coverage-${{ matrix.neo4j-version }}
working-directory: packages/${{ matrix.packages.package }}
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- if: ${{ !inputs.disable-coverage-archival && matrix.packages.package == 'graphql' }}
name: Archive coverage report
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: integration-coverage-${{ matrix.packages.package }}-${{ matrix.packages.coverage_name }}
path: packages/${{ matrix.packages.package }}/coverage-${{ matrix.neo4j-version }}-${{ matrix.graphql-version.coverage_path }}/
merge-integration-tests-results:
runs-on: ubuntu-latest
needs: integration-tests
steps:
- if: ${{ !inputs.disable-coverage-archival }}
name: Merge Artifacts
uses: actions/upload-artifact/merge@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: integration-coverage
pattern: integration-coverage-*