Skip to content

Bump hypothesis from 6.31.3 to 6.123.7 #656

Bump hypothesis from 6.31.3 to 6.123.7

Bump hypothesis from 6.31.3 to 6.123.7 #656

Workflow file for this run

name: Test PHX Events
on: [pull_request]
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Get OS Version
run: echo "os_version=$(lsb_release -sr)" >> "$GITHUB_ENV"
- name: Cache pip
id: cache-pip
uses: actions/cache@v2
with:
path: |
${{ env.pythonLocation }}
~/.cache/pip
key: ${{ runner.os }}-${{ env.os_version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/core.txt') }}-${{ hashFiles('requirements/dev.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.os_version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/core.txt') }}-
${{ runner.os }}-${{ env.os_version }}-${{ env.pythonLocation }}-
- name: Install dependencies
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements/core.txt -r requirements/dev.txt
- name: Run pytest
id: pytest
run: pytest -n=2 --cov=phx_events/ --cov-report= --cov-report=xml --maxfail=2 --disable-warnings
- name: Record Diff Coverage
id: diff-coverage
if: steps.pytest.outcome == 'success'
run: |
echo 'DIFF_COVERAGE<<EOF' >> "$GITHUB_ENV"
# shellcheck disable=SC2005
echo "$(diff-cover coverage.xml --fail-under 100 2>&1)" >> "$GITHUB_ENV"
echo 'EOF' >> "$GITHUB_ENV"
- name: Add Diff Coverage Comment - Missing Coverage
uses: mshick/add-pr-comment@v1
continue-on-error: true
if: steps.diff-coverage.conclusion == 'success' && startsWith(env.DIFF_COVERAGE, 'Failure')
with:
message: |
@${{ github.actor }} please add tests to increase coverage 🙏
```
${{ env.DIFF_COVERAGE }}
```
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
allow-repeats: false
- name: Add Diff Coverage Comment - Fully Covered
uses: mshick/add-pr-comment@v1
continue-on-error: true
if: steps.diff-coverage.conclusion == 'success' && !startsWith(env.DIFF_COVERAGE, 'Failure')
with:
message: |
All file changes covered 🎉
```
${{ env.DIFF_COVERAGE }}
```
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
allow-repeats: false
- name: Fail If Diff Coverage Under 100%
if: startsWith(env.DIFF_COVERAGE, 'Failure')
run: |
echo "${{ env.DIFF_COVERAGE }}"
exit 1