Skip to content

Commit

Permalink
👷(github) add client CI workflows
Browse files Browse the repository at this point in the history
We now also build/test the qcc tool and Docker image.
  • Loading branch information
jmaupetit committed Jun 12, 2024
1 parent e589907 commit 4b3e05c
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application
name: API

on:
push:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: QCC

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
build-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Install dependencies
run: |
cd src/client
poetry install
lint-client:
needs: build-client
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/client
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Lint with Black
run: poetry run black qcc tests
- name: Lint with Ruff
run: poetry run ruff check qcc tests
- name: Lint with MyPy
run: poetry run mypy qcc tests

test-client:
needs: build-client
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/client
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Test with pytest
run: poetry run pytest
16 changes: 0 additions & 16 deletions .github/workflows/docker-image.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Images CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the api Docker image
run: make build-api
- name: Build the client Docker image
run: make build-client

0 comments on commit 4b3e05c

Please sign in to comment.