Skip to content

closes #861

closes #861 #331

name: .NET Master
on:
push:
branches: [ master, stable ]
paths-ignore:
- '**.md'
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: main
- name: Upgrade Chrome browser
run: |
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable
google-chrome --version
- uses: getong/[email protected]
with:
host port: 3306 # Optional, default value is 3306. The port of host
container port: 3306 # Optional, default value is 3306. The port of container
character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mariadb version: '10.4.10' # Optional, default value is "latest". The version of the MariaDB
mysql database: 'some_test' # Optional, default value is "test". The specified database which will be create
mysql root password: 'secretpassword' # Required if "mysql user" is empty, default is empty. The root superuser password
mysql user: 'developer' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
mysql password: 'passwordtoo' # Required if "mysql user" exists. The password for the "mysql user"
- name: Sleep 15 seconds
run: sleep 15
- uses: getong/[email protected]
with:
rabbitmq version: '3.8.9-management'
host port: 5672
rabbitmq user: 'admin'
rabbitmq password: 'password'
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.16.2'
- name: Extract branch name
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: 'Preparing Frontend checkout'
uses: actions/checkout@v2
with:
repository: microting/eform-angular-frontend
ref: ${{ github.base_ref }}
path: eform-angular-frontend
- name: Install dependencies
run: dotnet restore main/eFormAPI/Plugins/Monitoring.Pn/Monitoring.Pn.sln
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d "v" -f 2)
- name: Build
run: dotnet build main/eFormAPI/Plugins/Monitoring.Pn/Monitoring.Pn.sln
- name: Unit Tests
run: dotnet test --no-restore -c Release -v n main/eFormAPI/Plugins/Monitoring.Pn/Monitoring.Pn.Test/Monitoring.Pn.Test.csproj
- name: Copy dependencies
run: |
cp -av main/eform-client/src/app/plugins/modules/monitoring-pn eform-angular-frontend/eform-client/src/app/plugins/modules/monitoring-pn
cp -av main/eform-client/e2e/Tests/monitoring-settings eform-angular-frontend/eform-client/e2e/Tests/monitoring-settings
cp -av main/eform-client/e2e/Tests/monitoring-general eform-angular-frontend/eform-client/e2e/Tests/monitoring-general
cp -av main/eform-client/e2e/Page\ objects/Monitoring eform-angular-frontend/eform-client/e2e/Page\ objects/Monitoring
cp -av main/eform-client/wdio-headless-plugin-step2.conf.js eform-angular-frontend/eform-client/wdio-headless-plugin-step2.conf.js
cp -av main/eform-client/wdio-plugin-step2.conf.js eform-angular-frontend/eform-client/wdio-plugin-step2.conf.js
mkdir -p eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins
cp -av main/eFormAPI/eFormAPI.Web/Plugins/Monitoring eform-angular-frontend/eFormAPI/eFormAPI.Web/Plugins/Monitoring
cd eform-angular-frontend/eform-client && ../../main/testinginstallpn.sh
- name: Build frontend
run: dotnet build eform-angular-frontend/eFormAPI/eFormAPI.sln > dotnet_log 2>&1 &
- name: NPM install
run: cd eform-angular-frontend/eform-client && npm install
- name: NPM start
run: cd eform-angular-frontend/eform-client && npm start > npm_log 2>&1 &
- name: Sleep 75 seconds
run: sleep 75
- name: Dotnet run
run: dotnet run --project eform-angular-frontend/eFormAPI/eFormAPI.Web/eFormAPI.Web.csproj > dotnet_log 2>&1 &
- name: Sleep 75 seconds
run: sleep 75
- name: Configuration testing
run: cd eform-angular-frontend/eform-client && npm run testheadless
- name: Plugin testing
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
- name: The job has failed
if: ${{ failure() }}
run: |
cat dotnet_log
cat eform-angular-frontend/eform-client/npm_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: C018LS2S7T3
status: FAILED
color: danger