update README and LICENSE #22
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '00 01 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
# Install a specific version of uv. | |
version: "0.5.1" | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install the project | |
run: uv sync --all-extras --dev --index="https://${{ secrets.JFROG_USER}}:${{ secrets.JFROG_TOKEN }}@quera.jfrog.io/artifactory/api/pypi/kirin/simple/ https://${{ secrets.JFROG_USER}}:${{ secrets.JFROG_TOKEN }}@quera.jfrog.io/artifactory/api/pypi/quera-pypi-algo/simple/" | |
- name: Run tests | |
# For example, using `pytest` | |
run: uv run just coverage | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
files: coverage.xml # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
token: ${{ secrets.CODECOV_TOKEN }} # required | |
- name: Archive code coverage results | |
if: matrix.python-version == '3.12' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: coverage.xml | |
retention-days: 2 | |
post: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event.pull_request | |
steps: | |
- uses: actions/checkout@v4 | |
- name: download covearge | |
uses: actions/download-artifact@v4 | |
with: | |
name: code-coverage-report | |
- name: check coverage | |
run: | | |
if [ -f coverage.xml ]; then | |
echo "Coverage file exists" | |
else | |
echo "Coverage file does not exist" | |
exit 1 | |
fi | |
- name: post covearge | |
uses: orgoro/coverage@v3.2 | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} |