-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis to GitHub Actions
- Loading branch information
Showing
2 changed files
with
54 additions
and
15 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,54 @@ | ||
--- | ||
name: unit-test action | ||
on: | ||
pull_request: | ||
# Run on merge to main because caches are inherited from parent branches | ||
push: | ||
branches: | ||
- main | ||
env: | ||
# This should be the default but we'll be explicit | ||
PRE_COMMIT_HOME: ~/.caches/pre-commit | ||
jobs: | ||
unittest_job: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python_version: ['2.7', '3.6'] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Install package | ||
shell: bash | ||
run: | | ||
python -m pip install . | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
python tests/test_generate_nhs_numbers.py | ||
coverage_job: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python_version: ['3.7'] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Install package | ||
shell: bash | ||
run: | | ||
python -m pip install . | ||
python -m pip install coverage | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
python -m coverage run --source nhs_number_generator tests/test_generate_nhs_numbers.py | ||
python -m coverage report --show-missing |
This file was deleted.
Oops, something went wrong.