Create gitleaks.yaml #147
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: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install -e . | |
- run: | | |
python -m pip install flake8 | |
flake8 --ignore=E501 . | |
- run: python setup.py sdist bdist_wheel | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install -r dev-requirements.txt | |
- run: | | |
cd docs | |
make linkcheck | |
make html | |
pytest: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', '3.11'] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Runs a single command using the runners shell | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install SSDPy | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade mock pytest pytest-mock pytest-cov codecov | |
pip install --editable . | |
- name: pytest | |
run: sudo -E $pythonLocation/bin/coverage run --source ssdpy,tests -m pytest tests/ | |
if: runner.os == 'Linux' | |
- name: pytest (Windows) | |
run: coverage run --source ssdpy,tests -m pytest tests/ | |
if: runner.os == 'Windows' | |
- name: Upload to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true |