Skip to content

Merge pull request #100 from victorskl/bump-deps-20241005 #142

Merge pull request #100 from victorskl/bump-deps-20241005

Merge pull request #100 from victorskl/bump-deps-20241005 #142

Workflow file for this run

name: Pull Request Build
on:
push:
branches:
- main
pull_request:
branches:
- main
# Actions Used:
# https://github.com/actions/checkout
# https://github.com/actions/setup-python
# https://github.com/marketplace/actions/codecov
# https://github.com/marketplace/actions/code-climate-coverage-action
# https://docs.codeclimate.com/docs/github-actions-test-coverage
# https://github.com/marketplace/actions/trufflehog-oss
jobs:
build:
# Default access (restricted) - https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/[email protected]
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install xclip xvfb
python -m pip install --upgrade pip
pip install '.[test]' .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
xvfb-run pytest --cov-report xml --cov=yawsso tests/
- name: Publish coverage to to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: yawsso
- name: Publish coverage to CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{ github.workspace }}/coverage.xml:coverage.py
- name: Publish coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: coveralls