This repository was archived by the owner on Jan 27, 2025. It is now read-only.
use rtk instead of custom store for omattiedot in function components #442
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: henkilo-ui | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "21" | |
distribution: "corretto" | |
cache: "maven" | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
cache-dependency-path: src/main/static/package-lock.json | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache playwright browsers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }}-pw-browsers | |
restore-keys: ${{ runner.os }}-pw-browsers | |
- name: Build frontend | |
working-directory: src/main/static | |
run: | | |
npm ci | |
npm run lint | |
npm run prettier | |
npm run e2e:install-deps | |
CI=true npm run e2e:ci | |
npm run build | |
- name: Upload e2e test artifact | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-results | |
path: src/main/static/playwright-results | |
retention-days: 10 | |
- name: Build backend | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn clean install -B -Dbranch=$GITHUB_REF_NAME -Drevision=$GITHUB_SHA -DbuildNumber=$GITHUB_RUN_NUMBER/$GITHUB_RUN_ATTEMPT org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Opetushallitus_henkilo-ui | |
- name: Upload henkilo-ui-jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: henkilo-ui-jar | |
path: target/henkiloui-*.jar | |
deploy-container: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Download henkilo-ui-jar | |
uses: actions/download-artifact@v4 | |
with: | |
name: henkilo-ui-jar | |
- name: Build Docker Container | |
shell: bash | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
git clone https://github.com/Opetushallitus/ci-tools.git | |
source ci-tools/common/setup-tools.sh | |
export BASE_IMAGE="baseimage-fatjar-openjdk21:master" | |
export ARTIFACT_NAME="henkilo-ui" | |
cp henkiloui-*.jar $DOCKER_BUILD_DIR/artifact/$ARTIFACT_NAME.jar | |
cp -vr src/main/resources/oph-configuration $DOCKER_BUILD_DIR/config/ | |
./ci-tools/common/pull-image.sh | |
./ci-tools/github-build/build-fatjar.sh $ARTIFACT_NAME | |
./ci-tools/github-build/upload-image.sh $ARTIFACT_NAME |