Skip to content

Removing the continue on error. #1291

Removing the continue on error.

Removing the continue on error. #1291

name: .NET Docker
on:
push:
tags:
- 'v*.*.*'
jobs:
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Build Docker image
id: build
run: cd eform-angular-frontend && docker build . -t microtingas/frontend-container:latest --build-arg GITVERSION=1.0.0 --build-arg SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}
shell: bash
- run: docker save microtingas/frontend-container:latest -o container.tar
- uses: actions/upload-artifact@v3
with:
name: container
path: container.tar
frontend-test:
needs: frontend-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c,d,e,f,g,h,i,j]
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- uses: actions/download-artifact@v3
with:
name: container
- run: docker load -i container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir /home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/errorShots
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15 seconds
run: sleep 15
- name: Get standard output
run: cat docker_run_log
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: testheadless2${{matrix.test}}
run: cd eform-angular-frontend/eform-client && npm run testheadless2${{matrix.test}}
- name: ${{matrix.test}} test
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/${{matrix.test}}/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
- name: Notify slack fail
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: CC04FGH5K
status: ${{matrix.test}} FAILED
color: danger
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/errorShots/chrome*.png
retention-days: 2
frontend-test-dotnet:
needs: frontend-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-angular-frontend/eFormAPI/eFormAPI.sln
- name: Build
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-frontend/eFormAPI/eFormAPI.Web.Tests/eFormAPI.Web.Tests.csproj
- name: Integration Tests
run: dotnet test --no-restore -c Release -v n eform-angular-frontend/eFormAPI/eFormAPI.Web.Integration.Tests/eFormAPI.Web.Integration.Tests.csproj
items-planning-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
- name: Copy Dockerfile
run: cp eform-angular-items-planning-plugin/Dockerfile .
- name: Build Docker image
id: build
run: |
pwd
ls -lah
docker build . -t microtingas/frontend-container:latest --build-arg GITVERSION=1.0.0 --build-arg PLUGINVERSION=1.0.0
shell: bash
- run: docker save microtingas/frontend-container:latest -o items-planning-container.tar
- uses: actions/upload-artifact@v3
with:
name: items-planning-container
path: items-planning-container.tar
items-planning-test:
needs: items-planning-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c]
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: items-planning-container
- run: docker load -i items-planning-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Sleep 15
run: sleep 15
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Tests/items-planning-settings eform-angular-frontend/eform-client/e2e/Tests/items-planning-settings
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Tests/items-planning-general eform-angular-frontend/eform-client/e2e/Tests/items-planning-general
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Page\ objects/ItemsPlanning eform-angular-frontend/eform-client/e2e/Page\ objects/ItemsPlanning
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Assets eform-angular-frontend/eform-client/e2e
cp -av eform-angular-items-planning-plugin/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts
cp -av eform-angular-items-planning-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
#mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
#cp -av eform-angular-items-planning-plugin/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin2${{matrix.test}}
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
- name: Notify slack fail
if: ${{ failure() }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel_id: C017TF6Q46T
status: FAILED
color: danger
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots/*.png
retention-days: 2
items-planning-test-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15
run: sleep 15
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build eform-angular-items-planning-plugin/eFormAPI/Plugins/ItemsPlanning.Pn/ItemsPlanning.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-items-planning-plugin/eFormAPI/Plugins/ItemsPlanning.Pn/ItemsPlanning.Pn.Test/ItemsPlanning.Pn.Test.csproj
greate-belt-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
../../eform-angular-greate-belt-plugin/testinginstallpn.sh
- name: Copy Dockerfile
run: cp eform-angular-greate-belt-plugin/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/greate-belt-container:latest -t microtingas/greate-belt-container:1.0.0 --build-arg GITVERSION=1.0.0 --build-arg PLUGINVERSION=1.0.0 --build-arg PLUGIN4VERSION=1.0.0
- name: Tag builds
run: |-
docker tag microtingas/greate-belt-container:latest microtingas/greate-belt-container:latest
- run: docker save microtingas/greate-belt-container:latest -o greate-belt-container.tar
- uses: actions/upload-artifact@v3
with:
name: greate-belt-container
path: greate-belt-container.tar
greate-belt-pn-test:
needs: greate-belt-pn-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- uses: actions/download-artifact@v3
with:
name: greate-belt-container
- run: docker load -i greate-belt-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/greate-belt-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15
run: sleep 15
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing ItemsPlanning checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
#cp -av eform-angular-greate-belt-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
#cp -av eform-angular-greate-belt-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
- name: Build frontend
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln > dotnet_log 2>&1 &
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: Get standard output
run: |
cat docker_run_log
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
#- name: Plugin testing
# run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: always()
run: |
cat docker_run_log
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
eform-angular-frontend/eform-client/errorShots/chrome*.png
retention-days: 2
greatebelt-dotnet-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Build
run: dotnet build eform-angular-greate-belt-plugin/eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-greate-belt-plugin/eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn.Test/GreateBelt.Pn.Test.csproj
workflow-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the work order version
id: get_frontend_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-angular-frontend && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Dockerfile
run: cp eform-angular-workflow-plugin/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/workflow-container:latest -t microtingas/workflow-container:1.0.0 --build-arg GITVERSION=1.00 --build-arg PLUGINVERSION=1.0.0
- run: docker save microtingas/workflow-container:latest -o workflow-container.tar
- uses: actions/upload-artifact@v3
with:
name: workflow-container
path: workflow-container.tar
workflow-test:
needs: workflow-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- uses: actions/download-artifact@v3
with:
name: workflow-container
- run: docker load -i workflow-container.tar
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Sleep 15 seconds
run: sleep 15
- name: Load DB dump
run: |
mysql -u root -h 127.0.0.1 --password=secretpassword -e 'create database `420_eform-angular-workflow-plugin`'
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-settings eform-angular-frontend/eform-client/e2e/Tests/workflow-settings
cp -av eform-angular-workflow-plugin/eform-client/e2e/Tests/workflow-general eform-angular-frontend/eform-client/e2e/Tests/workflow-general
cp -av eform-angular-workflow-plugin/eform-client/e2e/Page\ objects/Workflow eform-angular-frontend/eform-client/e2e/Page\ objects/Workflow
cp -av eform-angular-workflow-plugin/eform-client/wdio-headless-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.ts
cp -av eform-angular-workflow-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-workflow-plugin/testinginstallpn.sh
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/workflow-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 15 seconds
run: sleep 15
- name: Get standard output
run: cat docker_run_log
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: ${{ failure() }}
run: |
cat docker_run_log
workflow-dotnet-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Load DB dump
run: |
mysql -u root -h 127.0.0.1 --password=secretpassword -e 'create database `420_eform-angular-workflow-plugin`'
mysql -u root -h 127.0.0.1 --password=secretpassword 420_eform-angular-workflow-plugin < eform-angular-workflow-plugin/420_eform-angular-workflow-plugin.sql
- name: Build
run: dotnet build eform-angular-workflow-plugin/eFormAPI/Plugins/Workflow.Pn/Workflow.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-workflow-plugin/eFormAPI/Plugins/Workflow.Pn/Workflow.Pn.Test/Workflow.Pn.Test.csproj
backend-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-workflow-plugin
ref: stable
path: eform-angular-workflow-plugin
- name: 'Preparing backend configuration checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: 'Preparing time planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- name: 'Preparing greate belt checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-greate-belt-plugin
ref: stable
path: eform-angular-greate-belt-plugin
- name: Copy dependencies
run: |
cp -av eform-angular-workflow-plugin/eform-client/src/app/plugins/modules/workflow-pn eform-angular-frontend/eform-client/src/app/plugins/modules/workflow-pn
cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
cp -av eform-backendconfiguration-plugin/eform-client/src/app/plugins/modules/backend-configuration-pn eform-angular-frontend/eform-client/src/app/plugins/modules/backend-configuration-pn
cp -av eform-angular-greate-belt-plugin/eform-client/src/app/plugins/modules/greate-belt-pn eform-angular-frontend/eform-client/src/app/plugins/modules/greate-belt-pn
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cd eform-angular-frontend/eform-client && ../../eform-angular-items-planning-plugin/testinginstallpn.sh
../../eform-angular-timeplanning-plugin/testinginstallpn.sh
../../eform-backendconfiguration-plugin/testinginstallpn.sh
../../eform-angular-workflow-plugin/testinginstallpn.sh
../../eform-angular-greate-belt-plugin/testinginstallpn.sh
- name: Check nuget package versions
run: |
python3 main/extract_packages.py
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-angular-items-planning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the work flow version
id: get_plugin3_version
run: echo ::set-output name=PLUGIN3VERSION::$(cd eform-angular-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the backend configuration version
id: get_plugin4_version
run: echo ::set-output name=PLUGIN4VERSION::$(cd eform-backendconfiguration-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the time planning version
id: get_plugin5_version
run: echo ::set-output name=PLUGIN5VERSION::$(cd eform-angular-timeplanning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the greate belt version
id: get_plugin6_version
run: echo ::set-output name=PLUGIN6VERSION::$(cd eform-angular-greate-belt-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the frontend version
id: get_frontend_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-angular-frontend && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy frontendfiles
run: cp main/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-container:latest -t microtingas/work-items-planning-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_frontend_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN2VERSION=${{ steps.get_plugin_version.outputs.PLUGIN2VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }} --build-arg PLUGIN6VERSION=${{ steps.get_plugin6_version.outputs.PLUGIN6VERSION }} --build-arg SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-container:latest microtingas/work-items-planning-container:latest
- run: docker save microtingas/work-items-planning-container:latest -o work-items-planning-container.tar
- uses: actions/upload-artifact@v3
with:
name: work-items-planning-container
path: work-items-planning-container.tar
backend-pn-test:
needs: backend-pn-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a,b,c,d,e,f,g,h,i,j]
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: work-items-planning-container
- run: docker load -i work-items-planning-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15 seconds
run: sleep 15
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/work-items-planning-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: 'Preparing bacend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: 'Preparing ItemsPlanning checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-items-planning-plugin
ref: stable
path: eform-angular-items-planning-plugin
- name: Copy dependencies
run: |
#cp -av eform-angular-items-planning-plugin/eform-client/src/app/plugins/modules/items-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/items-planning-pn
#cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
cp -av eform-backendconfiguration-plugin/eform-client/src/app/plugins/modules/backend-configuration-pn eform-angular-frontend/eform-client/src/app/plugins/modules/backend-configuration-pn
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Tests/backend-configuration-settings eform-angular-frontend/eform-client/e2e/Tests/backend-configuration-settings
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Tests/backend-configuration-general eform-angular-frontend/eform-client/e2e/Tests/backend-configuration-general
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Page\ objects/BackendConfiguration eform-angular-frontend/eform-client/e2e/Page\ objects/BackendConfiguration
cp -av eform-backendconfiguration-plugin/eform-client/e2e/Assets eform-angular-frontend/eform-client/e2e/
cp -av eform-angular-items-planning-plugin/eform-client/e2e/Page\ objects/ItemsPlanning eform-angular-frontend/eform-client/e2e/Page\ objects/ItemsPlanning
cp -av eform-backendconfiguration-plugin/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2${{matrix.test}}.conf.ts
cp -av eform-backendconfiguration-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn
cp -av eform-backendconfiguration-plugin/eform-client/cypress/e2e/plugins/backend-configuration-pn eform-angular-frontend/eform-client/cypress/e2e/plugins
cp -av eform-backendconfiguration-plugin/eform-client/cypress/fixtures eform-angular-frontend/eform-client/cypress
#mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
#cp -av eform-angular-items-planning-plugin/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/ItemsPlanning
#cp -av eform-angular-timeplanning-plugin/eFormAPI/eFormAPI.Web/Plugins/TimePlanning.Pn eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/TimePlanning.Pn
#cp -av eform-backendconfiguration-plugin/eFormAPI/eFormAPI.Web/Plugins/BackendConfiguration.Pn eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/BackendConfiguration.Pn
#cd eform-angular-frontend/eform-client && ../../eform-backendconfiguration-plugin/testinginstallpn.sh
#../../eform-angular-items-planning-plugin/testinginstallpn.sh
#../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Build frontend
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln > dotnet_log 2>&1 &
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir /home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: Get standard output
run: |
cat docker_run_log
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Get standard output
run: |
cat docker_run_log
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin2${{matrix.test}}
- name: Load DB dump
if: matrix.test == 'a'
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_Angular.EformPlugins set Status = 2'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'drop database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < eform-angular-frontend/eform-client/cypress/e2e/plugins/backend-configuration-pn/a/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Restart the Docker container
if: matrix.test == 'a'
run: docker restart my-container
- name: Sleep 15
if: matrix.test == 'a'
run: sleep 15
- name: Get standard output
run: |
cat docker_run_log
- name: ${{matrix.test}} test
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/plugins/backend-configuration-pn/${{matrix.test}}/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: always()
run: |
cat docker_run_log
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/errorShots/chrome*.png
retention-days: 2
- name: Archive videos
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
/home/runner/work/work-items-planning-container/work-items-planning-container/eform-angular-frontend/eform-client/cypress/videos/*.mp4
retention-days: 2
backend-pn-test-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: 'Preparing bacend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-backendconfiguration-plugin
ref: stable
path: eform-backendconfiguration-plugin
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Sleep 15
run: sleep 15
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build eform-backendconfiguration-plugin/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-backendconfiguration-plugin/eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj
timeplanning-pn-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Preparing Time Planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Copy dependencies
run: |
cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-settings eform-angular-frontend/eform-client/e2e/Tests/time-planning-settings
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-general eform-angular-frontend/eform-client/e2e/Tests/time-planning-general
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Page\ objects/TimePlanning eform-angular-frontend/eform-client/e2e/Page\ objects/TimePlanning
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-headless-plugin-step2a.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2a.conf.ts
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: Copy Dockerfile
run: cp eform-angular-timeplanning-plugin/Dockerfile .
- name: Build the tagged Docker image
run: docker build . -t microtingas/time-planning-container:latest -t microtingas/time-planning-container:1.0.0 --build-arg GITVERSION=1.0.0 --build-arg PLUGINVERSION=1.0.0
- name: Tag builds
run: |-
docker tag microtingas/time-planning-container:latest microtingas/time-planning-container:latest
- run: docker save microtingas/time-planning-container:latest -o time-planning-container.tar
- uses: actions/upload-artifact@v3
with:
name: time-planning-container
path: time-planning-container.tar
timeplanning-pn-test:
needs: timeplanning-pn-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [a]
steps:
- uses: actions/checkout@v3
- name: 'Preparing Time Planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- uses: actions/download-artifact@v3
with:
name: time-planning-container
- run: docker load -i time-planning-container.tar
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: Sleep 15
run: sleep 15
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container -p 4200:5000 --network data microtingas/time-planning-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v3
with:
repository: microting/eform-angular-frontend
ref: stable
path: eform-angular-frontend
- name: Copy dependencies
run: |
cp -av eform-angular-timeplanning-plugin/eform-client/src/app/plugins/modules/time-planning-pn eform-angular-frontend/eform-client/src/app/plugins/modules/time-planning-pn
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-settings eform-angular-frontend/eform-client/e2e/Tests/time-planning-settings
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Tests/time-planning-general eform-angular-frontend/eform-client/e2e/Tests/time-planning-general
cp -av eform-angular-timeplanning-plugin/eform-client/e2e/Page\ objects/TimePlanning eform-angular-frontend/eform-client/e2e/Page\ objects/TimePlanning
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-headless-plugin-step2a.conf.ts eform-angular-frontend/eform-client/wdio-headless-plugin-step2a.conf.ts
cp -av eform-angular-timeplanning-plugin/eform-client/wdio-plugin-step2.conf.ts eform-angular-frontend/eform-client/wdio-plugin-step2.conf.ts
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
mkdir -p eform-angular-frontend/eform-client/cypress/e2e/plugins/
mkdir -p eform-angular-frontend/eform-client/cypress/fixtures/
cp -av eform-angular-timeplanning-plugin/eform-client/cypress/fixtures eform-angular-frontend/eform-client/cypress
cp -av eform-angular-timeplanning-plugin/eform-client/cypress/e2e/plugins/time-planning-pn eform-angular-frontend/eform-client/cypress/e2e/plugins/time-planning-pn
cd eform-angular-frontend/eform-client && ../../eform-angular-timeplanning-plugin/testinginstallpn.sh
- name: yarn install
run: cd eform-angular-frontend/eform-client && yarn install
- name: Create errorShots directory
run: mkdir eform-angular-frontend/eform-client/errorShots
- name: Pretest changes to work with Docker container
run: sed -i 's/localhost/mariadbtest/g' eform-angular-frontend/eform-client/e2e/Constants/DatabaseConfigurationConstants.ts
- name: Get standard output
run: |
cat docker_run_log
- name: DB Configuration
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/db/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Change rabbitmq hostname
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin2${{matrix.test}}
- name: Load DB dump
if: matrix.test == 'a'
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_Angular.EformPlugins set Status = 1'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < eform-angular-frontend/eform-client/cypress/e2e/plugins/time-planning-pn/a/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-time-planning-plugin < eform-angular-frontend/eform-client/cypress/e2e/plugins/time-planning-pn/a/420_eform-angular-time-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
- name: ${{matrix.test}} test
uses: cypress-io/github-action@v4
with:
start: echo 'hi'
wait-on: "http://localhost:4200"
wait-on-timeout: 120
browser: chrome
record: false
spec: cypress/e2e/plugins/time-planning-pn/${{matrix.test}}/*
config-file: cypress.config.ts
working-directory: eform-angular-frontend/eform-client
command-prefix: "--"
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "Now listening on: http://0.0.0.0:5000" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- name: The job has failed
if: always()
run: |
cat docker_run_log
- name: Archive screenshot artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: error Screenshots
path: |
eform-angular-frontend/eform-client/errorShots/chrome*.png
retention-days: 2
timeplanning-pn-dotnet-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Preparing Time Planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-angular-timeplanning-plugin
ref: stable
path: eform-angular-timeplanning-plugin
- name: Create docker network
run: docker network create --driver bridge --attachable data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password -p 5672:5672 rabbitmq:latest
- name: Sleep 15
run: sleep 15
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build eform-angular-timeplanning-plugin/eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-angular-timeplanning-plugin/eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/TimePlanning.Pn.Test.csproj
service-build:
runs-on: ubuntu-latest
steps:
- name: 'Preparing debian-service checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-debian-service
ref: stable
path: eform-debian-service
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-debian-service
- name: Build
run: dotnet build --configuration Release --no-restore eform-debian-service
- name: Test
run: dotnet test --no-restore --verbosity normal eform-debian-service
timeplanning-service-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: 'Preparing Debian Service checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-debian-service
ref: stable
path: eform-debian-service
- name: 'Preparing eform-service-timeplanning-plugin checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-timeplanning-plugin
ref: stable
path: eform-service-timeplanning-plugin
- name: Sleep 15
run: sleep 15
- name: Load DB dump
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < main/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_Angular`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_Angular < main/420_Angular.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < main/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-time-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-time-planning-plugin < main/420_eform-angular-time-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < main/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-case-template-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-case-template-plugin < main/420_eform-angular-case-template-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_chemical-base-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_chemical-base-plugin < main/420_chemical-base-plugin.sql
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-service-timeplanning-plugin
- name: Build
run: dotnet build --configuration Release --no-restore eform-service-timeplanning-plugin
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-service-timeplanning-plugin/ServiceTimePlanningPlugin.Integration.Test/ServiceTimePlanningPlugin.Integration.Test.csproj
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the TimePlanning version
id: get_plugin4_version
run: echo ::set-output name=PLUGIN4VERSION::$(cd eform-service-timeplanning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the service version
id: get_service_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-debian-service && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Docker file
run: cp main/Dockerfile-time-planning-service Dockerfile
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-service-container:latest -t microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_service_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:latest
docker tag microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container --network data microtingas/work-items-planning-service-container:latest "/ConnectionString=host=mariadbtest;Database=420_SDK;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 75 seconds for letting the container start and generate some output we can
run: sleep 75
- name: Get standard output
run: echo main/docker_run_log
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "No messages for us right now!" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
items-planning-service-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: 'Preparing Debian Service checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-debian-service
ref: stable
path: eform-debian-service
- name: 'Preparing eform-service-items-planning-plugin checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-items-planning-plugin
ref: stable
path: eform-service-items-planning-plugin
- name: Load DB dump
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < main/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_Angular`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_Angular < main/420_Angular.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < main/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-time-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-time-planning-plugin < main/420_eform-angular-time-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < main/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-case-template-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-case-template-plugin < main/420_eform-angular-case-template-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_chemical-base-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_chemical-base-plugin < main/420_chemical-base-plugin.sql
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-service-items-planning-plugin
- name: Build
run: dotnet build --configuration Release --no-restore eform-service-items-planning-plugin
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-service-items-planning-plugin/ServiceItemsPlanningPlugin.Integration.Test/ServiceItemsPlanningPlugin.Integration.Test.csproj
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-service-items-planning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the service version
id: get_service_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-debian-service && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Docker file
run: cp main/Dockerfile-items-planning-service Dockerfile
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-service-container:latest -t microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_service_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:latest
docker tag microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container --network data microtingas/work-items-planning-service-container:latest "/ConnectionString=host=mariadbtest;Database=420_SDK;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 75 seconds for letting the container start and generate some output we can
run: sleep 75
- name: Get standard output
run: echo main/docker_run_log
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "No messages for us right now!" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
workflow-service-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: 'Preparing Debian Service checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-debian-service
ref: stable
path: eform-debian-service
- name: 'Preparing eform-service-workflow-plugin checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-workflow-plugin
ref: stable
path: eform-service-workflow-plugin
- name: Load DB dump
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < main/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_Angular`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_Angular < main/420_Angular.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < main/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-time-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-time-planning-plugin < main/420_eform-angular-time-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < main/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-case-template-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-case-template-plugin < main/420_eform-angular-case-template-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_chemical-base-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_chemical-base-plugin < main/420_chemical-base-plugin.sql
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-service-workflow-plugin
- name: Build
run: dotnet build --configuration Release --no-restore eform-service-workflow-plugin
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-service-workflow-plugin/ServiceWorkflowPlugin.Integration.Test/ServiceWorkflowPlugin.Integration.Test.csproj
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the workflow version
id: get_plugin3_version
run: echo ::set-output name=PLUGIN3VERSION::$(cd eform-service-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the service version
id: get_service_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-debian-service && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Docker file
run: cp main/Dockerfile-workflow-service Dockerfile
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-service-container:latest -t microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_service_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:latest
docker tag microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container --network data microtingas/work-items-planning-service-container:latest "/ConnectionString=host=mariadbtest;Database=420_SDK;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 75 seconds for letting the container start and generate some output we can
run: sleep 75
- name: Get standard output
run: echo main/docker_run_log
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "No messages for us right now!" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
backend-configuration-service-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- name: Create docker network
run: docker network create --driver bridge data
- name: Start MariaDB
run: |
docker pull mariadb:10.8
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:10.8
- name: Start rabbitmq
run: |
docker pull rabbitmq:latest
docker run -d --hostname my-rabbit --name some-rabbit --network data -p 5672:5672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
- name: 'Preparing Debian Service checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-debian-service
ref: stable
path: eform-debian-service
- name: 'Preparing items planning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-items-planning-plugin
ref: stable
path: eform-service-items-planning-plugin
- name: 'Preparing workflow checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-workflow-plugin
ref: stable
path: eform-service-workflow-plugin
- name: 'Preparing TimePlanning checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-timeplanning-plugin
ref: stable
path: eform-service-timeplanning-plugin
- name: 'Preparing BackendConfiguration checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: microting/eform-service-backendconfiguration-plugin
ref: stable
path: eform-service-backendconfiguration-plugin
- name: Check nuget package versions
run: |
python3 main/extract_packages.py
- name: Load DB dump
run: |
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < eform-service-backendconfiguration-plugin/420_SDK.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_Angular`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_Angular < eform-service-backendconfiguration-plugin/420_Angular.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-backend-configuration-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-backend-configuration-plugin < eform-service-backendconfiguration-plugin/420_eform-backend-configuration-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-time-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-time-planning-plugin < eform-service-backendconfiguration-plugin/420_eform-angular-time-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-items-planning-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-items-planning-plugin < eform-service-backendconfiguration-plugin/420_eform-angular-items-planning-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-case-template-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-case-template-plugin < eform-service-backendconfiguration-plugin/420_eform-angular-case-template-plugin.sql
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_chemical-base-plugin`'
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_chemical-base-plugin < eform-service-backendconfiguration-plugin/420_chemical-base-plugin.sql
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore eform-service-backendconfiguration-plugin
- name: Build
run: dotnet build --configuration Release --no-restore eform-service-backendconfiguration-plugin
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n eform-service-backendconfiguration-plugin/ServiceBackendConfigurationPlugin.Integration.Test/ServiceBackendConfigurationPlugin.Integration.Test.csproj
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cd eform-service-items-planning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the workflow version
id: get_plugin3_version
run: echo ::set-output name=PLUGIN3VERSION::$(cd eform-service-workflow-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the TimePlanning version
id: get_plugin4_version
run: echo ::set-output name=PLUGIN4VERSION::$(cd eform-service-timeplanning-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the Backend Configuration version
id: get_plugin5_version
run: echo ::set-output name=PLUGIN5VERSION::$(cd eform-service-backendconfiguration-plugin && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Get the service version
id: get_service_version
run: echo ::set-output name=FRONTENDVERSION::$(cd eform-debian-service && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Copy Docker file
run: cp main/Dockerfile-service Dockerfile
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the tagged Docker image
run: docker build . -t microtingas/work-items-planning-service-container:latest -t microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} --build-arg GITVERSION=${{ steps.get_service_version.outputs.FRONTENDVERSION }} --build-arg PLUGINVERSION=${{ steps.get_version.outputs.VERSION }} --build-arg PLUGIN3VERSION=${{ steps.get_plugin3_version.outputs.PLUGIN3VERSION }} --build-arg PLUGIN4VERSION=${{ steps.get_plugin4_version.outputs.PLUGIN4VERSION }} --build-arg PLUGIN5VERSION=${{ steps.get_plugin5_version.outputs.PLUGIN5VERSION }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:latest
docker tag microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }} microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Start the newly build Docker container
id: docker-run
run: docker run --name my-container --network data microtingas/work-items-planning-service-container:latest "/ConnectionString=host=mariadbtest;Database=420_SDK;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
- name: Sleep 75 seconds for letting the container start and generate some output we can
run: sleep 75
- name: Get standard output
run: cat docker_run_log
- name: Compile eformparsed test program
run: |
dotnet build --configuration Release eform-service-backendconfiguration-plugin/ci/eformparsed/
- name: run eformparsed test program
run: |
dotnet eform-service-backendconfiguration-plugin/ci/eformparsed/bin/Release/net8.0/eformparsed.dll
- name: Stop the newly build Docker container
run: docker stop my-container
- name: Get standard output
run: |
cat docker_run_log
result=`cat docker_run_log | grep "No messages for us right now!" -m 1 | wc -l`
if [ $result -ne 1 ];then exit 1; fi
- run: docker save microtingas/work-items-planning-service-container:latest -o work-items-planning-service-container.tar
- uses: actions/upload-artifact@v3
with:
name: work-items-planning-service-container
path: work-items-planning-service-container.tar
deploy:
needs: [frontend-test, items-planning-test, items-planning-test-dotnet, workflow-test, workflow-dotnet-test, timeplanning-pn-test, timeplanning-pn-dotnet-test, backend-pn-test, backend-pn-test-dotnet, greate-belt-pn-test, greatebelt-dotnet-test, service-build, items-planning-service-build, workflow-service-build, timeplanning-service-build, backend-configuration-service-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: work-items-planning-container
- run: docker load -i work-items-planning-container.tar
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-container:latest microtingas/work-items-planning-container:latest
docker tag microtingas/work-items-planning-container:latest microtingas/work-items-planning-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Push the version Docker image
run: docker push microtingas/work-items-planning-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Push the tagged Docker image
run: docker push microtingas/work-items-planning-container:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
deploy-service:
needs: [frontend-test, items-planning-test, items-planning-test-dotnet, workflow-test, workflow-dotnet-test, timeplanning-pn-test, timeplanning-pn-dotnet-test, backend-pn-test, backend-pn-test-dotnet, greate-belt-pn-test, greatebelt-dotnet-test, service-build, items-planning-service-build, workflow-service-build, timeplanning-service-build, backend-configuration-service-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: main
- uses: actions/download-artifact@v3
with:
name: work-items-planning-service-container
- run: docker load -i work-items-planning-service-container.tar
- name: Get the version release
id: get_release_version
run: echo ::set-output name=VERSION::$(cd main && git describe --abbrev=0 --tags | cut -d "v" -f 2)
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Tag builds
run: |-
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:latest
docker tag microtingas/work-items-planning-service-container:latest microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Push the version Docker image
run: docker push microtingas/work-items-planning-service-container:${{ steps.get_release_version.outputs.VERSION }}
- name: Push the tagged Docker image
run: docker push microtingas/work-items-planning-service-container:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}