2020-11-20 00:31:31 +08:00
|
|
|
name: "build"
|
|
|
|
|
|
|
|
on:
|
2020-11-20 01:04:57 +08:00
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *" # Run everyday
|
2020-11-20 00:31:31 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-07 11:25:25 +08:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
2020-11-20 00:31:31 +08:00
|
|
|
with:
|
2022-10-31 21:50:03 +08:00
|
|
|
python-version: 3.11
|
2022-07-07 11:25:25 +08:00
|
|
|
- uses: actions/cache@v3
|
2020-11-20 00:31:31 +08:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-11-24 19:41:10 +08:00
|
|
|
python -m pip install --upgrade pip setuptools six wheel
|
2022-02-13 18:01:58 +08:00
|
|
|
python -m pip install pytest-cov -r requirements.txt
|
2020-11-20 00:31:31 +08:00
|
|
|
- name: Run tests
|
2023-06-26 00:28:01 +08:00
|
|
|
# TODO: #8818 Re-enable quantum tests
|
2022-10-31 21:50:03 +08:00
|
|
|
run: pytest
|
2023-06-26 00:28:01 +08:00
|
|
|
--ignore=quantum/q_fourier_transform.py
|
2022-10-31 21:50:03 +08:00
|
|
|
--ignore=project_euler/
|
|
|
|
--ignore=scripts/validate_solutions.py
|
|
|
|
--cov-report=term-missing:skip-covered
|
|
|
|
--cov=. .
|
2020-11-20 00:31:31 +08:00
|
|
|
- if: ${{ success() }}
|
|
|
|
run: scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
|