Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Koski testiajon nopeutus #2613

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/build_koski.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build Koski & Valpas
on:
pull_request:

jobs:
build-koski-frontend:
runs-on: "ubuntu-20.04"
strategy:
matrix:
node-version: [ 16.19.0 ]
steps:
- uses: actions/checkout@v3
- name: "Check Koski build cache"
uses: actions/cache@v3
id: koski-frontend-build-cache
with:
path: target/webapp/koski
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('web/app/**') }}
- name: Setup Node.js ${{ matrix.node-version }}
if: steps.koski-frontend-build-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: "Install npm dependencies"
if: steps.koski-frontend-build-cache.outputs.cache-hit != 'true'
working-directory: "web"
run: npm ci
- name: "Build Koski web"
if: steps.koski-frontend-build-cache.outputs.cache-hit != 'true'
working-directory: "web"
run: npm run build:prod
build-valpas-frontend:
runs-on: "ubuntu-20.04"
strategy:
matrix:
node-version: [ 16.19.0 ]
steps:
- uses: actions/checkout@v3
- name: "Check Valpas build cache"
uses: actions/cache@v3
id: valpas-frontend-build-cache
with:
path: target/webapp/valpas
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('valpas-web/src/**') }}
- name: Setup Node.js ${{ matrix.node-version }}
if: steps.valpas-frontend-build-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: valpas-web/package-lock.json
- name: "Install npm dependencies"
if: steps.valpas-frontend-build-cache.outputs.cache-hit != 'true'
working-directory: valpas-web
run: npm ci
- name: "Build Valpas web"
if: steps.valpas-frontend-build-cache.outputs.cache-hit != 'true'
working-directory: "valpas-web"
run: npm run build:prod
build-koski-backend:
needs: [build-koski-frontend, build-valpas-frontend]
runs-on: "ubuntu-20.04"
strategy:
matrix:
node-version: [ 16.19.0 ]
java-version: [ 11 ]
java-arch: [ x64 ]
java-dist: [ zulu ]
steps:
- uses: actions/checkout@v3
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
architecture: ${{ matrix.java-arch }}
distribution: ${{ matrix.java-dist }}
- name: Check Maven version
run: mvn --version
- name: "Get Koski production build"
uses: actions/cache@v3
id: koski-frontend-build-cache
with:
path: target/webapp/koski
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('web/app/**') }}
- name: "Get Valpas production build"
uses: actions/cache@v3
id: valpas-frontend-build-cache
with:
path: target/webapp/valpas
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('valpas-web/src/**') }}
- name: Build Koski app
run: mvn verify -DskipTests=true
- name: Check buildversion.txt
run: cat target/webapp/buildversion.txt
72 changes: 0 additions & 72 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,78 +386,6 @@
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<executions>
<execution>
<id>koski - install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<nodeVersion>v16.19.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>--version</arguments>
</configuration>
</execution>
<execution>
<id>koski - npm ci</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>koski - npm build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>run build:prod</arguments>
</configuration>
</execution>
<execution>
<id>valpas - install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<nodeVersion>v16.19.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>valpas - npm ci</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>valpas - npm build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<arguments>run build:prod</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading