Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain-S committed Nov 30, 2022
1 parent 34215b7 commit a2eef09
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 15 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/unit-tests.yml
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
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

0 comments on commit a2eef09

Please sign in to comment.