Skip to content

Commit

Permalink
Merge pull request #336 from tofu-rocketry/travis-actions
Browse files Browse the repository at this point in the history
Travis actions improvements
  • Loading branch information
tofu-rocketry authored May 10, 2024
2 parents acc897f + de304cd commit e3f5c81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@ on: [push, pull_request]

jobs:
unit-test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # 20.04 to allow for Py 3.6
strategy:
fail-fast: false
matrix:
python-version: ['3.x']
# Python versions on Rocky 8, Ubuntu 20.04, Rocky 9
python-version: ['3.6', '3.8', '3.9']
name: Python ${{ matrix.python-version }} test
steps:
- uses: actions/checkout@v4
- name: Set up Python

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Set up dependencies for python-ldap
run: sudo apt-get install libsasl2-dev libldap2-dev libssl-dev

- name: Base requirements for SSM
run: pip install -r requirements.txt

- name: Additional requirements for the unit and coverage tests
run: pip install -r requirements-test.txt

- name: Pre-test set up
run: |
export TMPDIR=$PWD/tmp
mkdir $TMPDIR
export PYTHONPATH=$PYTHONPATH:`pwd -P`
cd test
- name: Run unit tests
run: coverage run --branch --source=ssm,bin -m unittest discover --buffer

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.1
uses: codecov/codecov-action@v4
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ os: linux
language: python
python:
- "2.7"
- "3.8"

# Cache the dependencies installed by pip
cache: pip
Expand Down

0 comments on commit e3f5c81

Please sign in to comment.