Skip to content

[pre-commit.ci] pre-commit autoupdate #394

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #394

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
name: "${{ matrix.os }} :: ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Run pytest
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
run: |
cd moralization
if [ -z "$HUGGING_FACE_TOKEN" ]; then echo "not defined"; else echo "defined"; fi
python -m pytest -v -s --cov=. --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: moralization/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}