update s3 copytool #146
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: unit-tests-workflow | |
on: | |
pull_request: | |
branches: | |
- master | |
- next | |
jobs: | |
run-unit-tests: | |
name: "Run unit tests" | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
env: | |
FLAKE8_VERSION: "==3.8.4" | |
FLAKE8_CONFIG: ".flake8" | |
steps: | |
- name: Checkout Pilot3 repo | |
uses: actions/checkout@v3 | |
# - name: Hack me some python | |
# run: | | |
# Hack to get setup-python to work on act | |
#if [ ! -f "/etc/lsb-release" ] ; then | |
# echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release | |
# fi | |
- name: Setup Python3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Pip install | |
run: pip install "flake8${{ env.FLAKE8_VERSION }}" 'pep8-naming' 'flake8-blind-except' | |
- name: Setup env | |
run: | | |
pwd | |
ls -lah | |
pip freeze | |
flake8 --version | |
if [[ ${{ env.FLAKE8_CONFIG }} != ".flake8" ]]; then rm .flake8; fi | |
- name: Run flake8 | |
run: flake8 --config ${{ env.FLAKE8_CONFIG}} pilot.py pilot/ | |
- name: Run unit tests | |
run: python -m unittest | |