Skip to content

added contrast

added contrast #1577

Workflow file for this run

name: Ataru
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
jobs:
test-cypress:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Helsinki"
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
# Remove following in the future (and update script in package.json), it installs chrome version 116 as the current 117 has bug
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 1160321
id: setup-chrome
- run: |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
echo Installed chromium path: ${{ steps.setup-chrome.outputs.chrome-path }}
which chromium
chromium --version
- name: Prepare tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GA_BUILD_NUMBER: ${{ github.run_number }}
run: |
git clone https://github.com/Opetushallitus/ci-tools.git
source ci-tools/common/setup-tools.sh
docker run -d --name ataru-test-db -p 5433:5432 -e POSTGRES_DB=ataru-test -e POSTGRES_PASSWORD=oph -e POSTGRES_USER=oph 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/postgres:11
docker run -d --name ataru-test-redis -p 6380:6379 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/redis:5.0
docker run -d --name ataru-test-ftpd -p 2221:21 -p 30000-30009:30000-30009 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/hiekkalaatikko:ataru-test-ftpd
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@4.0
with:
lein: 2.9.1
- name: Run Cypress tests
run: |
./bin/cibuild.sh run-browser-tests-cypress
test-spec-and-mocha:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Helsinki"
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Prepare tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GA_BUILD_NUMBER: ${{ github.run_number }}
run: |
sudo apt-get update
sudo apt-get install -y lftp
git clone https://github.com/Opetushallitus/ci-tools.git
source ci-tools/common/setup-tools.sh
docker run -d --name ataru-test-db -p 5433:5432 -e POSTGRES_DB=ataru-test -e POSTGRES_PASSWORD=oph -e POSTGRES_USER=oph 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/postgres:11
docker run -d --name ataru-test-redis -p 6380:6379 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/redis:5.0
docker run -d --name ataru-test-ftpd -p 2221:21 -p 30000-30009:30000-30009 190073735177.dkr.ecr.eu-west-1.amazonaws.com/utility/hiekkalaatikko:ataru-test-ftpd
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@4.0
with:
lein: 2.9.1
- name: Run Spec and Mocha tests
run: |
./bin/cibuild.sh run-spec-and-mocha-tests
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Helsinki"
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@4.0
with:
lein: 2.9.1
- name: Build
run: ./bin/cibuild.sh create-uberjar
- uses: actions/cache@v2
id: restore-build
with:
path: target
key: ${{ github.sha }}
build-and-deploy-container:
needs: [test-cypress, test-spec-and-mocha, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: restore-build
with:
path: target
key: ${{ github.sha }}
- name: Build and deploy Docker containers
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"
./ci-tools/common/pull-image.sh
cp -v ./target/ataru.jar $DOCKER_BUILD_DIR/artifact/ataru-editori.jar
cp -vr ./oph-configuration $DOCKER_BUILD_DIR/config/
./ci-tools/github-build/build-fatjar.sh ataru-editori
./ci-tools/common/clean-docker-build-dir.sh
cp -v ./target/ataru.jar $DOCKER_BUILD_DIR/artifact/ataru-hakija.jar
cp -vr ./oph-configuration $DOCKER_BUILD_DIR/config/
./ci-tools/github-build/build-fatjar.sh ataru-hakija
./ci-tools/github-build/upload-image.sh ataru-editori
./ci-tools/github-build/upload-image.sh ataru-hakija