ci: Add pytest configuration and enhance test fixtures for improved t… #7
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: cognition-l1-experiment | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; else echo "requirements.txt not found"; fi | |
- name: Run tests | |
run: pytest | |
continue-on-error: true | |
- name: Archive test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: test-results |