update pipeline #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
# This workflow will install Python dependencies, run tests, lint, build, and upload your package. | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Tests | |
on: | |
push: | |
branches: [ "main" ] | |
tags: [ "*" ] # Trigger on any tag push | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up Docker Compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install docker-compose -y | |
- name: Build Docker images | |
run: docker-compose build | |
- name: Lint with ruff | |
run: docker-compose up --exit-code-from ruff_linter ruff_linter | |
- name: Format with ruff | |
run: docker-compose up --exit-code-from ruff_format ruff_format | |
- name: Build and run tests | |
run: docker-compose up --exit-code-from pytest pytest |