GeezerVison is showing github.com — Create GitHub action only for Project Euler (#3378) · D4VA/Python@5cb41e7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +30Lines changed: 30 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 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 |
Collapse file
Copy file name to clipboardExpand all lines: .travis.yml -10Lines changed: 0 additions & 10 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
10 | 10 | install: pip install pytest-cov -r requirements.txt |
11 | 11 | script: |
12 | 12 | - 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 |
23 | 13 | after_success: |
24 | 14 | - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md |
25 | 15 | notifications: |
|