Integration Checks #225
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: | ||
pull_request: | ||
types: [opened, synchronize] | ||
jobs: | ||
appserver-integration-checks: | ||
name: Pytest, Linting, Migration Integrity | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 environmental variable to pass in GitHub hash for Docker Compose | ||
run: |- | ||
echo "GITHUB_HASH=${{ github.sha }}" >> .env | ||
- name: Start docker | ||
run: |- | ||
docker-compose -f docker-compose.ci-test.yml up -d | ||
docker-compose -f docker-compose.ci-test.yml exec -T appserver timeout 300 bin/wait-for-flask | ||
- name: Show docker logs | ||
if: ${{ failure() }} | ||
run: |- | ||
docker-compose -f docker-compose.ci-test.yml logs | ||
- name: Appserver Linting Checks | ||
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: Pytests | ||
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-integration-checks: | ||
name: Client Linting and Unit Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [13.x] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Client Linting & Test | ||
run: |- | ||
cd client | ||
yarn install | ||
yarn build | ||
yarn lint-ci | ||
yarn test |