Skip to content

Commit 5cb41e7

Browse files
authored
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
1 parent 7d84f7f commit 5cb41e7

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/project_euler.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
pull_request:
3+
# only check if a file is changed within the project_euler directory
4+
paths:
5+
- 'project_euler/**'
6+
- '.github/workflows/project_euler.yml'
7+
8+
name: 'Project Euler'
9+
10+
jobs:
11+
project-euler:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
- name: Install pytest and pytest-cov
17+
run: |
18+
python -m pip install --upgrade pip
19+
python -m pip install --upgrade pytest pytest-cov
20+
- run: pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
21+
validate-solutions:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-python@v2
26+
- name: Install pytest
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install --upgrade pytest
30+
- run: pytest --durations=10 project_euler/validate_solutions.py

.travis.yml

-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ jobs:
1010
install: pip install pytest-cov -r requirements.txt
1111
script:
1212
- pytest --doctest-modules --ignore=project_euler/ --durations=10 --cov-report=term-missing:skip-covered --cov=. .
13-
- name: Project Euler
14-
install:
15-
- pip install pytest-cov
16-
script:
17-
- pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
18-
- name: Project Euler Solution
19-
install:
20-
- pip install pytest
21-
script:
22-
- pytest --tb=short --durations=10 project_euler/validate_solutions.py
2313
after_success:
2414
- scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
2515
notifications:

0 commit comments

Comments
 (0)