Get entire commit message instead of just subject. #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: Lint And Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
linter: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.11] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Setup flake8 annotations | |
uses: rbialon/flake8-annotations@v1 | |
- name: Run linter | |
run: | | |
sh utils/lint.sh | |
tests: | |
needs: linter | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.11] | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Install project | |
run: pip install . | |
- name: Run tests | |
run: | | |
pytest -v --cov-report term --cov-report xml --cov-report html --cov-config .coveragerc --cov=staflversion -l --tb=short --maxfail=1 tests/ | |
tag: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # for accurate versioning | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.ACTIONS_SSH_PRIVATE_KEY }} | |
- name: Determine Version | |
id: staflversion | |
uses: StaflSystems/CustomGithubActions/DetermineVersion@main | |
- name: Create a GitHub release | |
if: github.ref == 'refs/heads/main' | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.staflversion.outputs.full }} |