Bump docker/metadata-action from 4 to 5 #333
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
name: Run Unit Tests | |
on: [push, pull_request] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['2.x', '3.x'] | |
name: Python ${{ matrix.python-version }} test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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/[email protected] |