Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Dec 13, 2023
1 parent 3025fb4 commit f6b2972
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/autoblack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# GitHub Action that uses Black to reformat the Python code in an incoming pull request.
# If all Python code in the pull request is compliant with Black then this Action does nothing.
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
# https://github.com/cclauss/autoblack

name: autoblack
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install click
run: pip install 'click==8.0.4'
- name: Install Black
run: pip install 'black==22.3.0'
- name: Run black --check .
run: black --check .
- name: If needed, commit black changes to the pull request
if: failure()
run: |
black .
git config --global user.name 'autoblack'
git config --global user.email 'rocky@users.noreply.github.com'
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
34 changes: 34 additions & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pymathics-language (macOS)

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: macos-latest
strategy:
matrix:
os: [macOS]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
brew install llvm@11
python -m pip install --upgrade pip
pip install pytest
# Can remove after next Mathics-core release
python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.language
run: |
pip install -e .
- name: Test Mathics
run: |
make check
32 changes: 32 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pymathics-language (ubuntu)

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
# Can remove after next Mathics-core release
python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.language
run: |
pip install -e .
- name: Test Mathics
run: |
make check
34 changes: 34 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pymathics-language (Windows)

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
os: [windows]
python-version: [ 3.8, 3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install pytest
# Can remove after next Mathics-core release
python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.language
run: |
pip install -e .
- name: Test Mathics
run: |
make check

0 comments on commit f6b2972

Please # to comment.