TSK-1789: Updated Node version

This commit is contained in:
Tristan 2022-01-19 12:43:07 +01:00 committed by Tristan2357
parent fbef77b85a
commit ef183e42cc
2 changed files with 61 additions and 51 deletions

View File

@ -10,7 +10,7 @@ on:
env: env:
JAVA_VERSION: 11 JAVA_VERSION: 11
NODE_VERSION: 16.13.1 NODE_VERSION: 16.13.2
ARTIFACTS_CYPRESS_TESTS_NAME: cypress-tests ARTIFACTS_CYPRESS_TESTS_NAME: cypress-tests
ARTIFACTS_CYPRESS_TESTS_PATH: web/cypress ARTIFACTS_CYPRESS_TESTS_PATH: web/cypress
@ -93,19 +93,19 @@ jobs:
path: web/node_modules path: web/node_modules
key: ${{ runner.OS }}-${{ env.CACHE_WEB_NAME }}-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.OS }}-${{ env.CACHE_WEB_NAME }}-${{ hashFiles('**/yarn.lock') }}
- name: Cache maven dependencies (for web) - name: Cache maven dependencies (for web)
id: maven-cache
uses: actions/cache@v2.1.7 uses: actions/cache@v2.1.7
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }} restore-keys: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }}
- name: Populate maven cache
run: ./mvnw -B dependency:go-offline -pl :taskana-web -am
if: steps.maven-cache.outputs.cache-hit != 'true'
- name: Install Dependencies - name: Install Dependencies
if: steps.web-cache.outputs.cache-hit != 'true' if: steps.web-cache.outputs.cache-hit != 'true'
working-directory: web working-directory: web
run: yarn ci run: yarn ci
# currently this is not working because the angular-tree-component needs core-js ^2.4.1 and we have 3.X.X
#- name: Verify Dependencies
#working-directory: web
#run: npm ls
- name: Compile & build - name: Compile & build
working-directory: web working-directory: web
run: | run: |
@ -113,7 +113,7 @@ jobs:
yarn build:prod yarn build:prod
- name: Build maven artifact - name: Build maven artifact
run: ./mvnw -B install -pl :taskana-web -am run: ./mvnw -B install -pl :taskana-web -am
- name: Upload taskana-web artifact - name: Upload taskana-web dist artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }} name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }}
@ -125,38 +125,51 @@ jobs:
if: failure() if: failure()
uses: andymckay/cancel-action@0.2 uses: andymckay/cancel-action@0.2
compile_taskana-rest-spring-example-wildfly: test_frontend:
name: Compile taskana-rest-spring-example-wildfly
needs: compile_backend
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
name: Test taskana-web
needs: [ compile_frontend ]
steps: steps:
- name: Git checkout - name: Git checkout
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
- name: Set up JDK 8 - name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-java@v2 uses: actions/setup-node@v2.5.1
with: with:
distribution: adopt node-version: ${{ env.NODE_VERSION }}
java-version: 8 - name: Cache web dependencies
- name: Cache maven dependencies id: web-cache
uses: actions/cache@v2.1.7
with:
path: web/node_modules
key: ${{ runner.OS }}-${{ env.CACHE_WEB_NAME }}-${{ hashFiles('**/yarn.lock') }}
# Theoretically this step below not necessary because we reuse the cache from the 'compile_frontend' job.
# Sometimes the cache is not created, therefore this is a fallback.
- name: Install Dependencies
if: steps.web-cache.outputs.cache-hit != 'true'
working-directory: web
run: yarn ci
- name: Cache maven dependencies (for web)
id: maven-cache
uses: actions/cache@v2.1.7 uses: actions/cache@v2.1.7
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }} restore-keys: ${{ runner.OS }}-${{ env.CACHE_MAVEN_FOR_WEB_NAME }}
- name: Download taskana artifacts # Theoretically this step below not necessary because we reuse the cache from the 'compile_frontend' job.
uses: actions/download-artifact@v2 # Sometimes the cache is not created, therefore this is a fallback.
with: - name: Populate cache
name: ${{ env.ARTIFACTS_TASKANA_JARS_NAME }} run: ./mvnw -B dependency:go-offline -pl :taskana-web -am
path: ${{ env.ARTIFACTS_TASKANA_JARS_PATH }} if: steps.maven-cache.outputs.cache-hit != 'true'
- name: Compile - name: Test
run: ./mvnw -B test-compile -f rest/taskana-rest-spring-example-wildfly -DskipTests -Djacoco.skip working-directory: web
run: yarn run test -- --coverageReporters text-summary
- name: Cancel workflow - name: Cancel workflow
if: failure() if: failure()
uses: andymckay/cancel-action@0.2 uses: andymckay/cancel-action@0.2
test_frontend: test_e2e:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
name: Test taskana-web name: Test E2E
needs: [ compile_frontend, compile_backend ] needs: [ compile_frontend, compile_backend ]
steps: steps:
- name: Git checkout - name: Git checkout
@ -188,26 +201,23 @@ jobs:
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}-${{ hashFiles('**/pom.xml') }}
# Theoretically this step below not necessary because we reuse the cache from the 'compile_frontend' job.
# Sometimes the cache is not created, therefore this is a fallback.
- name: Populate cache
run: ./mvnw -B dependency:go-offline -pl :taskana-rest-spring-example-boot -am
if: steps.maven-cache.outputs.cache-hit != 'true'
- name: Download taskana artifacts - name: Download taskana artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: ${{ env.ARTIFACTS_TASKANA_JARS_NAME }} name: ${{ env.ARTIFACTS_TASKANA_JARS_NAME }}
path: ${{ env.ARTIFACTS_TASKANA_JARS_PATH }} path: ${{ env.ARTIFACTS_TASKANA_JARS_PATH }}
- name: Download taskana-web artifact # Theoretically this step below not necessary because we reuse the cache from the 'compile_frontend' job.
# Sometimes the cache is not created, therefore this is a fallback.
- name: Populate cache
run: ./mvnw -B dependency:go-offline -pl :taskana-rest-spring-example-boot -am
if: steps.maven-cache.outputs.cache-hit != 'true'
- name: Download taskana-web dist artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }} name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }}
path: ${{ env.ARTIFACTS_TASKANA_WEB_PATH }} path: ${{ env.ARTIFACTS_TASKANA_WEB_PATH }}
- name: Build frontend - name: Build frontend
run: ./mvnw install -pl :taskana-web run: ./mvnw install -pl :taskana-web
- name: Test
working-directory: web
run: yarn run test -- --coverageReporters text-summary
- name: Cypress tests - name: Cypress tests
working-directory: web working-directory: web
run: | run: |
@ -226,7 +236,7 @@ jobs:
test_backend: test_backend:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
name: Test ${{ matrix.module }} on ${{ matrix.database }} name: Test ${{ matrix.module }} on ${{ matrix.database }}
needs: [ compile_taskana-rest-spring-example-wildfly ] needs: [ compile_backend ]
strategy: strategy:
matrix: matrix:
module: module:
@ -294,10 +304,10 @@ jobs:
uses: andymckay/cancel-action@0.2 uses: andymckay/cancel-action@0.2
# As soon as we can upgrade the JDK to 11 we can add wildfly to the test matrix # As soon as we can upgrade the JDK to 11 we can add wildfly to the test matrix
test_taskana-rest-spring-example-wildfly: compile_and_test_taskana-rest-spring-example-wildfly:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
name: Test taskana-rest-spring-example-wildfly on POSTGRES_10 name: Compile and test taskana-rest-spring-example-wildfly on POSTGRES_10
needs: [ compile_taskana-rest-spring-example-wildfly ] needs: [ compile_backend ]
steps: steps:
- name: Git checkout - name: Git checkout
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
@ -330,7 +340,7 @@ jobs:
name: Release artifacts to OSS Sonatype name: Release artifacts to OSS Sonatype
if: github.repository == 'Taskana/taskana' && ( startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master' ) && github.head_ref == '' if: github.repository == 'Taskana/taskana' && ( startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master' ) && github.head_ref == ''
needs: needs:
[ test_frontend, test_backend, test_taskana-rest-spring-example-wildfly ] [ test_frontend, test_e2e, test_backend, compile_and_test_taskana-rest-spring-example-wildfly ]
# as documented in the gpg manual (https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html) # as documented in the gpg manual (https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html)
# we should execute this command before interacting with gpg (otherwise gpg won't work) # we should execute this command before interacting with gpg (otherwise gpg won't work)
env: env:
@ -356,7 +366,7 @@ jobs:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }} restore-keys: ${{ runner.os }}-${{ env.CACHE_MAVEN_NAME }}
- name: Download taskana-web artifact - name: Download taskana-web dist artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }} name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }}
@ -400,7 +410,7 @@ jobs:
name: Deploy demo app to IBM Cloud Foundry name: Deploy demo app to IBM Cloud Foundry
if: github.repository == 'Taskana/taskana' && github.ref == 'refs/heads/master' && github.head_ref == '' if: github.repository == 'Taskana/taskana' && github.ref == 'refs/heads/master' && github.head_ref == ''
needs: needs:
[ test_frontend, test_backend, test_taskana-rest-spring-example-wildfly ] [ test_frontend, test_e2e, test_backend, compile_and_test_taskana-rest-spring-example-wildfly ]
steps: steps:
- name: Git checkout - name: Git checkout
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
@ -420,7 +430,7 @@ jobs:
with: with:
name: ${{ env.ARTIFACTS_TASKANA_JARS_NAME }} name: ${{ env.ARTIFACTS_TASKANA_JARS_NAME }}
path: ${{ env.ARTIFACTS_TASKANA_JARS_PATH }} path: ${{ env.ARTIFACTS_TASKANA_JARS_PATH }}
- name: Download taskana-web artifacts - name: Download taskana-web dist artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }} name: ${{ env.ARTIFACTS_TASKANA_WEB_NAME }}
@ -456,7 +466,7 @@ jobs:
# no pull request and not on release # no pull request and not on release
if: github.head_ref == '' && !startsWith(github.ref, 'refs/tags') if: github.head_ref == '' && !startsWith(github.ref, 'refs/tags')
needs: needs:
[ test_frontend, test_backend, test_taskana-rest-spring-example-wildfly ] [ test_frontend, test_e2e, test_backend, compile_and_test_taskana-rest-spring-example-wildfly ]
steps: steps:
- name: Git checkout - name: Git checkout
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0

View File

@ -18,14 +18,6 @@
<sonar.skip>true</sonar.skip> <sonar.skip>true</sonar.skip>
</properties> </properties>
<dependencies>
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-logging</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -52,6 +44,14 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${version.aspectj-maven-plugin}</version>
<configuration>
<aspectLibraries combine.self="override"/>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>