Skip to content

Switch to reqless-core and new reqless-core APIs #16

Switch to reqless-core and new reqless-core APIs

Switch to reqless-core and new reqless-core APIs #16

Workflow file for this run

name: Test, build, and publish the package
on:
push:
branches: [main]
jobs:
test-and-build-and-update-metadata:
name: Test, build, and publish the package
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.PAT_GITHUB_ACTIONS }}
- uses: actions/setup-python@v4
with:
cache: pip
python-version: '3.9'
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y redis-server
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Check requirements.txt is up to date
run: |
source venv/bin/activate
pip install .[all]
pip uninstall -y reqless
pip freeze > requirements.txt
if ! `git diff --quiet`; then
echo "pip freeze caused file changes, failing!"
git diff
exit 1
fi
- name: Check style
run: |
source venv/bin/activate
make style
if ! `git diff --quiet`; then
echo "make style caused file changes, failing!"
git diff
exit 1
fi
- name: Run tests and build package
run: |
source venv/bin/activate
make test-with-coverage
python -m build
- name: Checkout tdg5/github-action-pack
uses: actions/checkout@v4
with:
path: .github/actions/tdg5/github-action-pack
ref: v0.0.6
repository: tdg5/github-action-pack
- name: Commit and push code coverage snapshot
uses: ./.github/actions/tdg5/github-action-pack/packages/stage-files-and-commit-and-push-action
with:
authorEmail: dannyguinther+spamburglar@gmail.com
authorName: Spamburglar
commitMessage: "[skip actions] Update code coverage snapshot"
optionalFilePaths: |
.meta/coverage/badge.svg
.meta/coverage/report.txt