ci: fix workflows #2
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: "CI" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} - CI" | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Ruff Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff | |
# Update output format to enable automatic inline annotations. | |
- name: Run Ruff | |
run: ruff check --output-format=github . | |
build: | |
name: Build Package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
fail-fast: false | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Build Chatbot | |
uses: ./.github/actions/build-python | |
with: | |
context-directory: ./app/ | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry pytest | |
# Update output format to enable automatic inline annotations. | |
- name: Run Pytest | |
run: | | |
poetry run pytest |