mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-05 02:40:16 +00:00
ba6310b647
* Update validate solution script to fetch only submitted solution * Update workflow file with the updated PE script * Fix: do not fetch `validate_solutions.py` script * Update script to use the requests package for API calls * Fix: install requests module * Pytest ignore scripts/ directory
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
on:
|
|
pull_request:
|
|
# Run only if a file is changed within the project_euler directory and related files
|
|
paths:
|
|
- "project_euler/**"
|
|
- ".github/workflows/project_euler.yml"
|
|
- "scripts/validate_solutions.py"
|
|
schedule:
|
|
- cron: "0 0 * * *" # Run everyday
|
|
|
|
name: "Project Euler"
|
|
|
|
jobs:
|
|
project-euler:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- name: Install pytest and pytest-cov
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade pytest pytest-cov
|
|
- run: pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
|
|
validate-solutions:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- name: Install pytest and requests
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade pytest requests
|
|
- run: pytest scripts/validate_solutions.py
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|