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:
|
2022-02-13 05:57:44 +00:00
|
|
|
python-version: "3.10"
|
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
|
2022-02-13 10:01:58 +00:00
|
|
|
python -m pip install pytest-cov -r requirements.txt
|
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
|