Update library version to 3.2.1 (#218) #59
Workflow file for this run
This file contains 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: "CI Build: E2E tests" | |
on: | |
push: | |
tags: | |
- 'docker_*' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
env: | |
SERVAL_CLIENT_ID: ${{ secrets.SERVAL_CLIENT_ID }} | |
SERVAL_CLIENT_SECRET: ${{ secrets.SERVAL_CLIENT_SECRET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
ClearML_AccessKey: ${{ secrets.CLEARML_ACCESSKEY }} | |
ClearML_SecretKey: ${{ secrets.CLEARML_SECRETKEY }} | |
SERVAL_HOST_URL: http://localhost | |
SERVAL_AUTH_URL: https://sil-appbuilder.auth0.com | |
steps: | |
- uses: actions/checkout@v3 | |
# get version of machine.py - MACHINE_PY_IMAGE will force the docker compose to use the proper version of machine.py | |
- name: Install regctl | |
uses: iarekylew00t/regctl-installer@v1 | |
- name: Getr Version of Machine.py | |
run: echo "MACHINE_PY_IMAGE=ghcr.io/sillsdev/machine.py:$(regctl image config ghcr.io/sillsdev/machine.py | jq -r ".config.Labels[\"org.opencontainers.image.version\"]")" >> $GITHUB_ENV | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Check if there is a corresponding branch in Serval | |
id: find_matching_branch | |
continue-on-error: true | |
if: ${{ github.ref_name }} != "master" | |
run: cd .. && git clone https://github.com/sillsdev/serval.git --branch ${{ github.ref_name }} && dotnet build machine && dotnet build serval && docker compose -f "serval/docker-compose.yml" up -d && sleep 20 | |
- name: Get Serval and start containers | |
if: steps.find_matching_branch.outcome != 'success' | |
run: dotnet build && cd .. && mkdir tmp && cd tmp && git clone https://github.com/sillsdev/serval.git && cd serval && dotnet build && export MACHINE_TESTING_DIR="../../machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #separate repos; allow time for mongo to start up properly | |
- name: Debug network | |
run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr | |
- name: Pre-Test | |
run: sudo mkdir -p /var/lib/serval && sudo chmod 777 /var/lib/serval | |
- name: Test | |
if: steps.find_matching_branch.outcome != 'success' | |
run: cd ../tmp/serval && dotnet test --no-build --verbosity normal --filter "TestCategory!=slow&TestCategory=E2E" | |
- name: Test | |
if: steps.find_matching_branch.outcome == 'success' | |
run: cd ../serval && dotnet test --no-build --verbosity normal --filter "TestCategory!=slow&TestCategory=E2E" | |
- name: Debug network (Post test) | |
if: ${{ failure() }} | |
run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr | |
- name: Stop containers main | |
if: ${{ (success() || failure()) && (steps.find_matching_branch.outcome != 'success')}} | |
run: docker compose -f "../tmp/serval/docker-compose.yml" down | |
- name: Stop containers branch | |
if: ${{ (success() || failure()) && (steps.find_matching_branch.outcome == 'success')}} | |
run: docker compose -f "../serval/docker-compose.yml" down |