Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis actions improvements #336

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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