2020-11-19 16:31:31 +00:00
|
|
|
name: "build"
|
|
|
|
|
|
|
|
on:
|
2020-11-19 17:04:57 +00:00
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *" # Run everyday
|
2020-11-19 16:31:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
2020-11-24 11:41:10 +00:00
|
|
|
python-version: "3.9"
|
2020-11-19 16:31:31 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-11-24 11:41:10 +00:00
|
|
|
python -m pip install --upgrade pip setuptools six wheel
|
2021-03-20 06:01:13 +00:00
|
|
|
python -m pip install mypy pytest-cov -r requirements.txt
|
2021-11-06 12:58:15 +00:00
|
|
|
- run: mypy . # See `mypy.ini` for configuration settings.
|
2020-11-19 16:31:31 +00:00
|
|
|
- name: Run tests
|
2021-10-14 16:19:47 +00:00
|
|
|
run: pytest --doctest-modules --ignore=project_euler/ --ignore=scripts/validate_solutions.py --cov-report=term-missing:skip-covered --cov=. .
|
2020-11-19 16:31:31 +00:00
|
|
|
- if: ${{ success() }}
|
|
|
|
run: scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
|