37 package version #27
Workflow file for this run
This file contains hidden or 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: test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
CODE_ROOT: llmworkbook | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: latest | |
- name: Install Project Dependencies | |
run: poetry install --with dev,test | |
- name: Run tests | |
run: poetry run coverage run --source=llmworkbook --omit="llmworkbook/tests/*" -m pytest | |
- name: Generate test coverage report | |
run: poetry run coverage xml coverage.xml | |
if: github.event_name == 'pull_request' | |
- name: Process coverage report | |
uses: orgoro/coverage@v3.1 | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event_name == 'pull_request' | |