Skip to content

Commit

Permalink
Merge branch 'geonetwork:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gkeimeHDF authored Jul 29, 2024
2 parents acb9144 + 7856573 commit 89fa1e2
Show file tree
Hide file tree
Showing 134 changed files with 2,672 additions and 677 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.checks.outputs.ref }} # use the PR head ref if applicable; otherwise keep default behaviour
persist-credentials: false
Expand All @@ -57,9 +57,7 @@ jobs:
cache: 'npm'

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3

- name: Install dependencies
run: npm ci
Expand Down
52 changes: 29 additions & 23 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -38,9 +38,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx format:check
- run: npx nx affected -t lint --parallel=3
Expand Down Expand Up @@ -79,7 +77,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -89,9 +87,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx affected -t build --parallel=3

Expand All @@ -102,7 +98,7 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand Down Expand Up @@ -142,38 +138,48 @@ jobs:
comment_tag: build-options
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cypress-run:
name: End-to-end tests
e2e-run:
name: End-to-end tests, GeoNetwork v${{ matrix.gn_version }}
runs-on: ubuntu-latest
outputs:
screenshotsUrl: ${{ steps.upload-screenshots.outputs.artifact-url }}
strategy:
fail-fast: false
matrix:
gn_version: [4.2.2, 4.2.8, 4.4.0]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3

- name: Create pipeline docker image
run: cd tools && docker build . -f pipelines/Dockerfile -t geonetwork/geonetwork-ui-tools-pipelines:latest
working-directory: tools
run: docker build . -f pipelines/Dockerfile -t geonetwork/geonetwork-ui-tools-pipelines:latest

- name: Build the backend
run: sudo docker-compose -f support-services/docker-compose.yml up -d init
- name: Start up backend support services
env:
GEONETWORK_VERSION: ${{ matrix.gn_version }}
working-directory: support-services
run: docker compose up --quiet-pull init

- name: Install dependencies
run: |
npm ci
- run: npm ci

- name: Run tests
run: npx nx run-many --target=e2e
- name: Run e2e tests
run: npx nx affected --target=e2e

- uses: actions/upload-artifact@v4
if: always()
id: upload-screenshots
with:
name: cypress-screenshots
name: cypress-screenshots-gn-${{ matrix.gn_version }}
path: |
apps/datahub-e2e/cypress/screenshots/**/*
apps/metadata-editor-e2e/cypress/screenshots/**/*
Expand All @@ -193,7 +199,7 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webcomponents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.checks.outputs.ref }}
persist-credentials: false
Expand Down
3 changes: 2 additions & 1 deletion apps/datahub-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"cypressConfig": "apps/datahub-e2e/cypress.config.js",
"devServerTarget": "datahub:serve:development",
"testingType": "e2e",
"browser": "chrome"
"browser": "chrome",
"port": "cypress-auto"
},
"configurations": {
"production": {
Expand Down
Loading

0 comments on commit 89fa1e2

Please sign in to comment.