Integration Checks #240
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: Integration Checks | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [master] | ||
jobs: | ||
appserver: | ||
name: Appserver Linting and Testing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.event_name != 'workflow_dispatch' | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- 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 | ||
image_name: kg-appserver | ||
image_tag: ${{ github.sha }},latest | ||
context: ./appserver | ||
dockerfile: ./Dockerfile | ||
- name: Create environment variable to pass in GitHub hash for Docker Compose | ||
run: echo "GITHUB_HASH=${{ github.sha }}" >> .env | ||
- name: Bring up containers | ||
run: |- | ||
docker-compose -f docker-compose.ci-test.yml up -d | ||
docker-compose -f docker-compose.ci-test.yml exec -T appserver timeout 500 bin/wait-for-flask | ||
- name: Show Docker logs | ||
if: ${{ failure() }} | ||
run: docker-compose -f docker-compose.ci-test.yml logs | ||
- name: Linting | ||
run: |- | ||
docker-compose -f docker-compose.ci-test.yml exec -T appserver mypy . | ||
docker-compose -f docker-compose.ci-test.yml exec -T appserver pycodestyle . | ||
- name: PyTest | ||
run: docker-compose -f docker-compose.ci-test.yml exec -T appserver pytest tests -p no:warnings | ||
- name: Migration Integrity Check | ||
run: docker-compose -f docker-compose.ci-test.yml exec -T appserver ./bin/migration-integrity-check | ||
client: | ||
name: Client Linting and Testing | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: client | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
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 |