diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6218894..7e46611 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,18 +1,28 @@ -name: HaploDynamics check - -on: - push: - branches: [ $default-branch ] - pull_request: - branches: [ $default-branch ] - +name: Workflow for Codecov example-python +on: [push, pull_request] jobs: - build: + run: runs-on: ubuntu-latest - steps: - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run tests and collect coverage + run: pytest --cov . + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage reports to Codecov + run: | + # Replace `linux` below with the appropriate OS + # Options are `alpine`, `linux`, `macos`, `windows` + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -t ${CODECOV_TOKEN} +