Make this reppo uptodate/runnable #292
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: | |
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: 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 |