Skip to content

Commit

Permalink
Build/update to node 20 pnpm 9 (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatRefrigerator authored Aug 1, 2024
2 parents 7d993b9 + 3dc8124 commit 929874d
Show file tree
Hide file tree
Showing 30 changed files with 11,110 additions and 8,118 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Get Previous tag"
Expand Down Expand Up @@ -59,14 +59,14 @@ jobs:
echo ::set-output name=buildx_args_nightly::--platform ${DOCKER_PLATFORMS} \
${TAGS_NIGHTLY} .
- name: Checkout tag ${{ steps.previoustag.outputs.tag }}
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ steps.prepare.outputs.build_version == 'true' }}
with:
fetch-depth: 0
ref: ${{ steps.previoustag.outputs.tag }}
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v2
uses: andstor/file-existence-action@v3
with:
files: "Dockerfile"
- name: Build ${{ steps.previoustag.outputs.tag }} if not present and Dockerfile is present
Expand All @@ -77,7 +77,7 @@ jobs:
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args_version }}
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args_latest }}
- name: Checkout main/master as nightly
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build nightly
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ jobs:
strategy:
fail-fast: true # Good to fail all fast if one of the matrix runs fails.
matrix:
node-version: [16]
node-version: [20]
python-version: ["3.10"]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Docker for hadolint-docker pre-commit
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and run pre-commit
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
with:
extra_args: --all-files
Run-tests:
Expand All @@ -41,26 +41,26 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: cypress/browsers:node16.16.0-chrome107-ff107
image: cypress/browsers:node-20.14.0-chrome-126.0.6478.114-1-ff-127.0.1-edge-126.0.2592.61-1
options: --user 1001

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up default config files
run: cd src && cp config-examples/* config && for i in config/*-example.js; do mv -- "$i" "${i%-example.js}.js"; done
- name: Set up pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
version: 9
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache PNPM and Cypress
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/Cypress
Expand All @@ -69,7 +69,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-cypress-store-
- name: Cypress install
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v6
with:
runTests: false
install-command: pnpm install --frozen-lockfile --silent
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Multistage build
# 1. Stage: Build the app
FROM node:16-alpine as build-stage
FROM node:20-alpine as build-stage
WORKDIR /opt/client/

# System deps and app setup:
RUN apk --no-cache add 'build-base>=0.5' 'git>=2.38' \
&& npm install -g 'pnpm@^8'
&& npm install -g 'pnpm@^9'

# Add diretories with necessary config files
COPY pnpm-lock.yaml package.json /opt/client/
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/download.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ describe('download functionality', function () {
const cleanName = typeTitle.replace(' ', '_')
cy.get('.open-download-btn').click()
cy.get('.download-modal')
cy.get('.export-file-name input[type=text]').clear().type(cleanName)
cy.get('.export-file-name input[type=text]').clear()
cy.get('.export-file-name input[type=text]').type(cleanName)
cy.get('.download-format .v-select__selections').click()
cy.get('.v-menu__content--fixed > .v-select-list > .v-list')
.contains('div > .v-list__tile > ' +
Expand Down
7 changes: 3 additions & 4 deletions cypress/e2e/place.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ describe('place component', () => {
cy.get('.place-input-component input[type=text]').should('be.visible')
cy.get('.custom-html-icon-div').should('have.length', 0)
// TODO: map is currently not moved. See https://stackoverflow.com/questions/60987787/test-dragging-a-leaflet-map-in-cypress
cy.get('#map-view')
.trigger('mousedown', 'center')
.trigger('mousemove', {movementX: 5, movementY: 5})
.trigger('mouseup')
cy.get('#map-view').trigger('mousedown', 'center')
cy.get('#map-view').trigger('mousemove', {movementX: 5, movementY: 5})
cy.get('#map-view').trigger('mouseup')
// cy.url().should('not.contain', '-48.467559814453125,-23.856953970230652')
})
it('renders single place correctly', () => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"release": "standard-version",
"start": "pnpm dev",
"test": "cypress open",
"test:ci": "start-server-and-test 'pnpm dev' http://localhost:8080/ 'cypress run -q && cypress run --component -q'",
"test:ci": "start-server-and-test 'webpack serve --config build/webpack.dev.conf.js --host local-ipv6' http://localhost:8080/ 'cypress run -q && cypress run --component -q'",
"test:component": "cypress open --component",
"test:component:ci": "start-server-and-test 'pnpm dev' http://localhost:8080/ 'cypress run --component -q'",
"test:e2e": "cypress open --e2e",
Expand Down Expand Up @@ -68,7 +68,7 @@
"lz-string": "^1.4.4",
"mini-css-extract-plugin": "^2.0.0",
"moment": "^2.29.4",
"openrouteservice-js": "^0.3.2",
"openrouteservice-js": "^0.4.1",
"path-browserify": "^1.0.1",
"postcss": "^8.4.16",
"postcss-import": "^11.0.0",
Expand Down Expand Up @@ -120,7 +120,7 @@
"@vue/test-utils": "^1.3.0",
"babel-plugin-istanbul": "^4.1.1",
"chalk": "^2.0.1",
"chromedriver": "^108.0.0",
"chromedriver": "^127.0.1",
"commitizen": "^4.2.4",
"cypress": "^12.17.3",
"cz-conventional-changelog": "^3.3.0",
Expand Down
Loading

0 comments on commit 929874d

Please sign in to comment.