diff --git a/.github/workflows/python-app.yml b/.github/workflows/api.yml similarity index 99% rename from .github/workflows/python-app.yml rename to .github/workflows/api.yml index 617d7977..a8c2c37e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/api.yml @@ -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: diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml new file mode 100644 index 00000000..bc445ac0 --- /dev/null +++ b/.github/workflows/client.yml @@ -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 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 3b52dd3c..00000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: make build diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml new file mode 100644 index 00000000..7b7422f5 --- /dev/null +++ b/.github/workflows/docker-images.yml @@ -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