Remove the dependency on pysqlite3 to improve installation on MacOS and Windows #238
Workflow file for this run
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
# Basic workflow | |
name: build | |
# Use more columns for terminal output | |
env: | |
COLUMNS: 120 | |
# Controls when the action will run | |
# Workflow begins with push or PR events | |
# Focuses on the master branch only | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Create one single job | |
# This job performs all necessary checks | |
jobs: | |
build: | |
# Use the latest version of Ubuntu on Microsoft Azure | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Performs all actions on different versions of Python | |
python-version: ['3.11'] | |
# Define the workflow steps | |
steps: | |
# Checkout the code of the repository | |
- name: Check out Repository Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Run the mdl linting tool | |
# Refers to .mdlrc file in repository | |
- name: Run Markdown Linting | |
uses: actionshub/markdownlint@main | |
# Setup Python for the current language version | |
- name: Setup Python ${{ matrix.python-version }} | |
if: always() | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install pip | |
- name: Install Pip | |
if: always() | |
run: | | |
pip install -U pip | |
# Install poetry | |
- name: Install Poetry | |
if: always() | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.4.0 | |
# Install dependencies | |
- name: Install dependencies | |
if: always() | |
run: | | |
poetry install | |
# Run the linters | |
- name: Run Linters | |
if: always() | |
run: | | |
poetry run task lint | |
# Run the program | |
- name: Run program | |
if: always() | |
run: | | |
poetry run chasten analyze chasten --config $PWD/.chasten/ --debug-level ERROR --debug-dest CONSOLE --search-path . | |
# Run the tests | |
- name: Run Tests | |
if: always() | |
run: | | |
poetry run task test | |
# Run the test coverage monitoring | |
- name: Run Test Coverage | |
if: always() | |
run: | | |
poetry run task test-coverage-silent > coverage.txt | |
# Display the Coverage Report | |
- name: Display Coverage | |
if: always() | |
run: | | |
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") | |
echo "total=$TOTAL" >> $GITHUB_ENV | |
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY | |
CURRENT_GITHUB_STEP_SUMMARY="\`\`\`\n$(cat coverage.txt)\n\`\`\`" | |
echo "$CURRENT_GITHUB_STEP_SUMMARY" >> $GITHUB_STEP_SUMMARY | |
# Create the Coverage Badge | |
- name: Make Badge | |
uses: schneegans/[email protected] | |
with: | |
# GIST_TOKEN is a GitHub personal access token with scope "gist". | |
auth: ${{ secrets.GIST_TOKEN }} | |
gistID: 5300aa276fa9261b2b21b96c3141b3ad | |
filename: covbadge.json | |
label: Coverage | |
message: ${{ env.total }}% | |
minColorRange: 50 | |
maxColorRange: 90 | |
valColorRange: ${{ env.total }} |