Ibutsu tests #1070
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: Ibutsu tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: ["opened", "synchronize", "reopened"] | |
create: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install dependencies | |
run: pip install pre-commit | |
- name: Run pre-commit | |
run: pre-commit run --all --verbose | |
test-backend: | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11"] # five is broken on 3.11 - celery update needed "3.11.0-alpha - 3.11"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install backend dependencies with Python ${{ matrix.python-version }} | |
working-directory: ./backend | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -U -e .[test] | |
- name: Run backend tests | |
working-directory: ./backend | |
run: pytest | |
test-frontend: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
- name: Install frontend dependencies | |
working-directory: ./frontend | |
run: yarn install | |
- name: Run frontend tests | |
working-directory: ./frontend | |
run: yarn test | |
build-backend: | |
runs-on: ubuntu-latest | |
needs: test-backend | |
strategy: | |
matrix: | |
app: [backend, scheduler, worker] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build image ${{ matrix.app }} | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: ./backend | |
image: ibutsu-${{ matrix.app }} | |
dockerfiles: | | |
./backend/docker/Dockerfile.${{ matrix.app }} | |
build-frontend: | |
runs-on: ubuntu-latest | |
needs: test-frontend | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build frontend image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: ./frontend | |
image: ibutsu-frontend | |
dockerfiles: | | |
./frontend/docker/Dockerfile.frontend |