Bump black from 22.12.0 to 24.3.0 #109
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: [push] | |
jobs: | |
upload_progress_bar_to_wiki: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }}.wiki | |
path: wiki | |
- run: | | |
cd wiki | |
printf '%s\n%s\n' "## Tests are running! Please wait!" "![](progress.gif)" > Home.md | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit --allow-empty -m "Add progress bar" | |
git push | |
run_tests: | |
needs: upload_progress_bar_to_wiki | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: Install prerequisites | |
run: | | |
sudo apt install -y libgtest-dev | |
python -m pip install --upgrade pip pipenv | |
- name: Initialize workspace | |
run: > | |
pipenv install | |
- name: Lint with Black linter | |
run: > | |
pipenv run black homework_checker/**/*.py --check --diff | |
- name: Run unit tests | |
run: > | |
pipenv run python3 -m unittest discover -v homework_checker/core/tests/ | |
- name: Upload result md file | |
uses: actions/upload-artifact@v2 | |
with: | |
name: homework_result | |
path: results.md | |
upload_results_to_wiki: | |
needs: run_tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }}.wiki | |
path: wiki | |
- name: Download result md file | |
uses: actions/download-artifact@v2 | |
with: | |
name: homework_result | |
- run: | | |
mv results.md wiki/Home.md | |
cd wiki | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit --allow-empty -m "Update results" | |
git push | |
publish_to_pypi: | |
needs: run_tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: Install pypa/build | |
run: python3 -m pip install build --user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: Publish package | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |