Skip to content

Integration Checks #227

Integration Checks

Integration Checks #227

name: Integration Checks
on:
workflow_dispatch:
pull_request:
jobs:
appserver:
name: Appserver Linting and Testing
runs-on: ubuntu-latest
env:
DOCKER_COMPOSE_CMD: docker compose -f docker-compose.ci-test.yml
steps:
- name: Cancel Previous Runs
if: github.event_name != 'workflow_dispatch'
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Build appserver image
uses: whoan/docker-build-with-cache-action@v5
with:
username: ${{ secrets.AZURE_CR_USERNAME }}
password: ${{ secrets.AZURE_CR_PASSWORD }}
registry: ***ARANGO_DB_NAME***.azurecr.io

Check failure on line 29 in .github/workflows/integration-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/integration-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 29
image_name: kg-appserver
image_tag: ${{ github.sha }}
context: ./appserver
dockerfile: ./Dockerfile
- name: Create environment variable to pass in GitHub hash for Docker Compose
run: echo "GITHUB_HASH=${{ github.sha }}" >> .env
- name: Migration Integrity Check
run: ${{ env.DOCKER_COMPOSE_CMD }} run --no-deps appserver bin/migration-integrity-check
- name: Linting and code style
run: |-
${{ env.DOCKER_COMPOSE_CMD }} run --no-deps appserver flake8 .
${{ env.DOCKER_COMPOSE_CMD }} run --no-deps appserver mypy .
${{ env.DOCKER_COMPOSE_CMD }} run --no-deps appserver pycodestyle .
- name: Bring up containers and wait for webserver to be ready
timeout-minutes: 10
run: |-
${{ env.DOCKER_COMPOSE_CMD }} up -d
${{ env.DOCKER_COMPOSE_CMD }} exec -T appserver bin/wait-for-flask
- name: Run PyTest
run: ${{ env.DOCKER_COMPOSE_CMD }} exec -T appserver pytest tests -p no:warnings
- name: Show Docker logs
if: ${{ failure() }}
run: ${{ env.DOCKER_COMPOSE_CMD }} logs --timestamps
client:
name: Client Linting and Testing
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
cache-dependency-path: client/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build application
run: yarn build
- name: Run linter
run: yarn lint-ci
- name: Run tests
run: yarn test