From 498d51b4e802cb40cac58aae1eff1f723bbbd896 Mon Sep 17 00:00:00 2001 From: philippeitis <33013301+philippeitis@users.noreply.github.com> Date: Wed, 4 Mar 2020 16:07:32 -0800 Subject: [PATCH] Enable Continuous Integration with GitHub Actions. This automatically runs unit tests on various operating systems and Python versions when Python files are modified to ensure that functionality remains correct. --- .github/workflows/pythonapp.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pythonapp.yml diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml new file mode 100644 index 00000000..4f6bbc0b --- /dev/null +++ b/.github/workflows/pythonapp.yml @@ -0,0 +1,31 @@ +name: Test code + +on: + push: + paths: + - "**/*.py" + pull_request: + paths: + - "**/*.py" + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with unittest + run: | + python -m unittest discover tests