Skip to content

Merge branch 'HF_upload_scripts' of https://github.com/mlcommons/peop… #149

Merge branch 'HF_upload_scripts' of https://github.com/mlcommons/peop…

Merge branch 'HF_upload_scripts' of https://github.com/mlcommons/peop… #149

Workflow file for this run

name: CI conda enviroment with pylint and pytest
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
conda install pylint==2.6.0
- name: Run Pylint
run: |
python ./.github/workflows/lint.py --path ./galvasr2 --threshold -3
# This workflow contains a single job called "build"
#license:
# The type of runner that the job will run on
# runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# - name: Check License Header
# uses: apache/skywalking-eyes@main
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}#
black:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Black
run: pip install black
- name: Run black --check .
run: |
black --check ./galvasr2
black --check ./scripts
- name: If needed, commit black changes to the pull request
if: failure()
run: |
black ./galvasr2
black ./scripts
git config --global user.name 'autoblack'
git config --global user.email “$(git log -1 --pretty=format:‘%ae’)”
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "fixup: Format Python code with Black"
git push