forked from TheAlgorithms/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create GitHub action only for Project Euler (TheAlgorithms#3378)
* Add GitHub action for Project Euler only * Add second job for Project Euler * Remove Project Euler jobs from Travis CI * Fix typo for actions/setup-python * Rename the workflow file * Change name of file in workflow * Remove comments from Travis config file
- Loading branch information
1 parent
7d84f7f
commit 5cb41e7
Showing
2 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters