From 5cb41e7820fb69a16ef47893fd2b16d76baef7e8 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sat, 17 Oct 2020 08:23:17 +0530 Subject: [PATCH] Create GitHub action only for Project Euler (#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 --- .github/workflows/project_euler.yml | 30 +++++++++++++++++++++++++++++ .travis.yml | 10 ---------- 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/project_euler.yml diff --git a/.github/workflows/project_euler.yml b/.github/workflows/project_euler.yml new file mode 100644 index 0000000..852b0ad --- /dev/null +++ b/.github/workflows/project_euler.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index f31dae8..2a4a639 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,16 +10,6 @@ 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 after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md notifications: -- GitLab