Skip to content

Add build_whl job in GitHub actions to build DE modules whl #60

Add build_whl job in GitHub actions to build DE modules whl

Add build_whl job in GitHub actions to build DE modules whl #60

Workflow file for this run

# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
---
name: Linters
on:
push:
branches:
- "**" # matches every branch
- "!gh-pages" # excludes gh-pages branch
pull_request:
branches:
- master
jobs:
run_flake8:
if: ${{ github.ref == 'refs/heads/1.7' }}
name: Run pytest-flake8 against code tree
runs-on: ubuntu-latest
steps:
- name: checkout DE Modules
uses: actions/checkout@v3
with:
path: decisionengine_modules
- name: checkout DE Framework
uses: actions/checkout@v3
with:
path: decisionengine
repository: HEPCloud/decisionengine
- name: checkout GlideinWMS for python3
uses: actions/checkout@v3
with:
path: glideinwms
repository: glideinWMS/glideinwms
ref: branch_v3_9
- uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Note Python version/implementation
run: |
which python3
python3 -c 'import sys; print(sys.version)'
python3 -c 'import platform; print(platform.python_implementation())'
python3 -m pip cache dir
- name: Install dependencies for GlideinWMS
run: |
set -x
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install -r ${{ github.workspace }}/glideinwms/requirements.txt
- name: Install dependencies for DE Framework
run: |
set -x
cd ${{ github.workspace }}/decisionengine
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade pytest
python3 -m pip install --user Cython
python3 -m pip install --user numpy
python3 setup.py bdist_wheel
python3 -m pip install --user dist/decisionengine*.whl
- name: Install DE Modules dependencies
run: |
set -x
cd ${{ github.workspace }}/decisionengine_modules
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest
python3 -m pip install -e .[develop] --user
python3 -m pip list --user
- name: Run Flake8 checks
env:
PYTHONPATH: ${{ github.workspace }}/../:${{ github.workspace }}
run: |
cd ${{ github.workspace }}/decisionengine_modules
pytest -m flake8 --flake8 --log-level=WARNING
run_pylint:
name: Run pylint against code tree
runs-on: ubuntu-latest
steps:
- name: checkout DE Modules
uses: actions/checkout@v3
with:
path: decisionengine_modules
- name: checkout DE Framework
uses: actions/checkout@v3
with:
path: decisionengine
repository: HEPCloud/decisionengine
- name: checkout GlideinWMS for python3
uses: actions/checkout@v3
with:
path: glideinwms
repository: glideinWMS/glideinwms
ref: branch_v3_9
- uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Note Python version/implementation
run: |
which python3
python3 -c 'import sys; print(sys.version)'
python3 -c 'import platform; print(platform.python_implementation())'
python3 -m pip cache dir
- name: Install dependencies for GlideinWMS
run: |
set -x
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install -r ${{ github.workspace }}/glideinwms/requirements.txt
- name: Install dependencies for DE Framework
run: |
set -x
cd ${{ github.workspace }}/decisionengine
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade pytest
python3 -m pip install --user Cython
python3 -m pip install --user numpy
python3 setup.py bdist_wheel
python3 -m pip install --user dist/decisionengine*.whl
- name: Install DE Modules dependencies
run: |
set -x
cd ${{ github.workspace }}/decisionengine_modules
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest
python3 -m pip install -e .[develop] --user
python3 -m pip list --user
- name: Run pylint against the code tree
env:
PYTHONPATH: ${{ github.workspace }}/decisionengine_modules/src:${{ github.workspace }}/../:${{ github.workspace }}
run: |
cd ${{ github.workspace }}/decisionengine_modules
pylint src/decisionengine_modules/
license-check:
name: Run REUSE to check license compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fsfe/reuse-action@v1