Skip to content

Create GitHub action only for Project Euler #3378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/project_euler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
pull_request:
# only check if a file is changed within the project_euler directory
paths:
- 'project_euler/**'
- '.github/workflows/project_euler.yml'

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 --durations=10 --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
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pytest
- run: pytest --durations=10 project_euler/validate_solutions.py
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
install: pip install pytest-cov -r requirements.txt
script:
- pytest --doctest-modules --ignore=project_euler/ --durations=10 --cov-report=term-missing:skip-covered --cov=. .
- name: Project Euler
install:
- pip install pytest-cov
script:
- pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
- name: Project Euler Solution
install:
- pip install pytest
script:
- pytest --tb=short --durations=10 project_euler/validate_solutions.py
# - name: Project Euler
# install:
# - pip install pytest-cov
# script:
# - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
# - name: Project Euler Solution
# install:
# - pip install pytest
# script:
# - pytest --tb=short --durations=10 project_euler/validate_solutions.py
after_success:
- scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
notifications:
Expand Down