Skip to content

Commit

Permalink
Merge branch 'dev' into 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrellwarde authored Feb 22, 2024
2 parents fd9e7c8 + cca61f6 commit cb2cc9f
Show file tree
Hide file tree
Showing 45 changed files with 1,465 additions and 1,356 deletions.
5 changes: 0 additions & 5 deletions .changeset/fast-cherries-learn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fresh-toys-impress.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/large-wolves-tap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/light-crews-cover.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/real-wasps-talk.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-tigers-serve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tricky-chairs-learn.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Create release PR or release
id: changesets
uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 # v1.4.5
uses: changesets/action@e2f8e964d080ae97c874b19e27b12e0a8620fb6c # v1.4.6
with:
title: changesets for branch `${{ github.ref_name }}`
version: yarn changeset-version-${{ github.ref_name }}
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,26 @@ jobs:
unit-tests:
uses: ./.github/workflows/reusable-unit-tests.yml
with:
disable-code-cov-upload: ${{ github.event_name == 'schedule' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
disable-coverage-archival: ${{ github.event_name == 'schedule' }}

api-library-tests:
uses: ./.github/workflows/reusable-api-library-tests.yml
with:
disable-code-cov-upload: ${{ github.event_name == 'schedule' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
disable-coverage-archival: ${{ github.event_name == 'schedule' }}

package-tests:
uses: ./.github/workflows/reusable-package-tests.yml

integration-tests-on-prem:
uses: ./.github/workflows/reusable-integration-tests-on-prem.yml
with:
disable-code-cov-upload: ${{ github.event_name == 'schedule' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
disable-coverage-archival: ${{ github.event_name == 'schedule' }}

integration-tests-on-prem-nightly:
uses: ./.github/workflows/reusable-integration-tests-on-prem-nightly.yml
with:
disable-code-cov-upload: ${{ github.event_name == 'schedule' }}
disable-coverage-archival: ${{ github.event_name == 'schedule' }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_NEO4J_DEV_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_NEO4J_DEV_SECRET_ACCESS_KEY }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: lts/*
- name: Install markdownlint
run: npm install -g markdownlint-cli
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
- uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
id: filter
with:
list-files: shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
- uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
id: filter
with:
list-files: shell
Expand Down
37 changes: 3 additions & 34 deletions .github/workflows/reusable-api-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ name: "@neo4j/graphql specific tests"
on:
workflow_call:
inputs:
disable-code-cov-upload:
description: "Whether or not to upload the test coverage to CodeCov"
disable-coverage-archival:
description: "Whether or not to archive the test coverage"
required: false
default: false
type: boolean
secrets:
CODECOV_TOKEN:
description: "API token for Codecov, if it is available in the current context"
required: false

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
tck-tests:
Expand Down Expand Up @@ -61,14 +54,6 @@ jobs:
env:
VERIFY_TCK: true
NEO_USER: neo4j
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/graphql/coverage/
flags: graphql,tck
fail_ci_if_error: true

e2e-tests:
runs-on: ubuntu-latest
Expand All @@ -93,14 +78,6 @@ jobs:
run: yarn
- name: Run E2E tests
run: yarn --cwd packages/graphql run test e2e --coverage
- if: ${{ env.CODECOV_TOKEN != '' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/graphql/coverage/
flags: graphql,e2e
fail_ci_if_error: true

schema-tests:
runs-on: ubuntu-latest
Expand All @@ -115,15 +92,7 @@ jobs:
run: yarn
- name: Run Schema tests
run: yarn --cwd packages/graphql run test:schema --coverage
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/graphql/coverage/
flags: graphql,schema
fail_ci_if_error: true
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload }}
- if: ${{ !inputs.disable-coverage-archival }}
name: Archive coverage report
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
with:
node-version: lts/*
- name: Initialize CodeQL
uses: github/codeql-action/init@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3
uses: github/codeql-action/init@379614612a29c9e28f31f39a59013eb8012a51f0 # v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e675ced7a7522a761fc9c8eb26682c8b27c42b2b # v3
uses: github/codeql-action/analyze@379614612a29c9e28f31f39a59013eb8012a51f0 # v3
58 changes: 24 additions & 34 deletions .github/workflows/reusable-integration-tests-on-prem-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,19 @@ name: "Integration tests (on-prem, Neo4j nightly build)"
on:
workflow_call:
inputs:
disable-code-cov-upload:
description: "Whether or not to upload the test coverage to CodeCov"
disable-coverage-archival:
description: "Whether or not to archive the test coverage"
required: false
default: false
type: boolean
secrets:
CODECOV_TOKEN:
required: false
description: "API token for Codecov, if it is available in the current context"
AWS_ACCESS_KEY_ID:
required: true
description: "AWS Access Key ID"
AWS_SECRET_ACCESS_KEY:
required: true
description: "AWS Secret Access Key"

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
ecr-login:
runs-on: ubuntu-latest
Expand All @@ -45,19 +39,23 @@ jobs:

strategy:
matrix:
node: ["lts/*", "latest"]
node: [
{ name: "lts/*", coverage_name: "lts" },
{ name: "latest", coverage_name: "latest" }
]
packages:
[
{ package: "ogm", shard: 1/1 },
{ package: "introspector", shard: 1/1 },
{ package: "graphql", shard: 1/4 },
{ package: "graphql", shard: 2/4 },
{ package: "graphql", shard: 3/4 },
{ package: "graphql", shard: 4/4 },
{ 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 },
]
graphql-version:
- "^15.0.0"
- "^16.0.0"
graphql-version: [
{ version: "^15.0.0", coverage_path: 15 },
{ version: "^16.0.0", coverage_path: 16 }
]

runs-on: ubuntu-latest

Expand All @@ -77,10 +75,10 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setting up Node.js with version ${{ matrix.node }}
- name: Setting up Node.js with version ${{ matrix.node.name }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.name }}
cache: yarn
- name: Login to ECR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
Expand All @@ -104,30 +102,22 @@ jobs:
- name: Install dependencies
run: yarn --immutable
- name: Overwrite GraphQL version
run: yarn up --exact graphql@${{ matrix.graphql-version }}
run: yarn up --exact graphql@${{ matrix.graphql-version.version }}
- name: Run @neo4j/graphql integration tests and move coverage
run: |
yarn test:int --shard=${{ matrix.packages.shard }} --coverage
mv coverage coverage-nightly
mv coverage coverage-nightly-${{ matrix.graphql-version.coverage_path }}
working-directory: packages/${{ matrix.packages.package }}
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: neo4j://localhost:7687
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload && matrix.packages.package == 'graphql' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/${{ matrix.packages.package }}/coverage-nightly/
flags: ${{ matrix.packages.package }},nightly,integration
fail_ci_if_error: true
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload && matrix.packages.package == 'graphql' }}
- if: ${{ !inputs.disable-coverage-archival && matrix.packages.package == 'graphql' }}
name: Archive coverage report
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: integration-nightly-coverage-${{ matrix.packages.package }}-${{ matrix.packages.shard }}
path: packages/${{ matrix.packages.package }}/coverage/
name: integration-nightly-coverage-${{ matrix.packages.package }}-${{ matrix.graphql-version.coverage_path }}-${{ matrix.packages.coverage_name }}-${{ matrix.node.coverage_name }}
path: packages/${{ matrix.packages.package }}/coverage-nightly-${{ matrix.graphql-version.coverage_path }}/
- name: Stop Neo4j container
if: always()
run: |
Expand All @@ -138,7 +128,7 @@ jobs:
runs-on: ubuntu-latest
needs: integration-tests
steps:
- if: ${{ env.CODECOV_TOKEN != '' && !inputs.disable-code-cov-upload }}
- if: ${{ !inputs.disable-coverage-archival }}
name: Merge Artifacts
uses: actions/upload-artifact/merge@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
Expand Down
Loading

0 comments on commit cb2cc9f

Please sign in to comment.