Skip to content

Commit

Permalink
Add GitHub Actions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Dec 9, 2024
1 parent 7ff9a21 commit 0e0ad9d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on: [ push, pull_request ]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get -y install discount python3-build python3-venv python3-pygame python3-importlib-resources make
pip install --user pyscroll
- name: Install dependencies (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install tox discount
# Prepend optional brew binary directories to PATH
echo "$(brew --prefix)/opt/python/libexec/bin" >> $GITHUB_PATH
pip install --user --break-system-packages pyscroll
# Prepend user bin directory to PATH
echo $(python -c "import os; import sysconfig; print(sysconfig.get_path('scripts', f'{os.name}_user'))") >> $GITHUB_PATH
- name: Build
run: |
if [ "$RUNNER_OS" != "macOS" ]; then
pip install tox
fi
tox

0 comments on commit 0e0ad9d

Please sign in to comment.