Skip to content

[Snyk] Upgrade jotai from 1.7.8 to 1.13.1 #432

[Snyk] Upgrade jotai from 1.7.8 to 1.13.1

[Snyk] Upgrade jotai from 1.7.8 to 1.13.1 #432

Workflow file for this run

name: koodisto-app
on:
workflow_dispatch:
push:
branches: [ master ]
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
cypress:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Code coverrage cache
uses: actions/cache@v2
env:
cache-name: cache-cypress-coverage
with:
path: cypress-coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Use node 14
uses: actions/setup-node@v2
with:
node-version: '16.17.0'
cache: 'npm'
- name: Install dependencies
run: npm run install:all
- name: Run Cypress tests
run: npm run cypress:ci
react-build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Code coverrage cache
uses: actions/cache@v2
env:
cache-name: cache-code-coverage
with:
path: coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Use node 14
uses: actions/setup-node@v2
with:
node-version: '16.17.0'
cache: 'npm'
- name: Install dependencies
run: npm run install:all
- name: Run jest
run: npm run test
- name: Run react Build
run: npm run build
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
- name: Maven version
run: mvn --version
- name: Build Spring-Boot
run: cd server && mvn clean install && cd -
- name: Upload koodisto-app-spring-boot
uses: actions/upload-artifact@v2
with:
name: koodisto-app-spring-boot
path: server/target/koodisto-app.jar
deploy-container:
needs: [cypress,react-build]
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Download koodisto-app-spring-boot
uses: actions/download-artifact@v2
with:
name: koodisto-app-spring-boot
- name: Build Docker Conainer
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-openjdk11:master"
export ARTIFACT_NAME="koodisto-app"
mv koodisto-app.jar $DOCKER_BUILD_DIR/artifact/$ARTIFACT_NAME.jar
cp -vr 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
sonarcloud:
needs: [react-build, cypress]
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Code coverrage cache
uses: actions/cache@v2
env:
cache-name: cache-code-coverage
with:
path: coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Cypress coverrage cache
uses: actions/cache@v2
env:
cache-name: cache-cypress-coverage
with:
path: cypress-coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}