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-09-22 17:37:18 +00:00
|
|
|
- run: mypy --install-types --non-interactive .
|
2020-11-19 16:31:31 +00:00
|
|
|
- name: Run tests
|
2020-11-29 17:41:09 +00:00
|
|
|
run: pytest --doctest-modules --ignore=project_euler/ --ignore=scripts/ --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
|