From fe1370f55d55efeb570010eaeb10b0d2eb47aea5 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sat, 23 Nov 2024 17:30:40 +0000 Subject: [PATCH] Add GitHub CI (fix #16) --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..417ce0f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +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 python3 + - name: Install dependencies (macOS) + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew install tox + # Prepend optional brew binary directories to PATH + echo "$(brew --prefix)/opt/python/libexec/bin" >> $GITHUB_PATH + - name: Build + run: | + if [ "$RUNNER_OS" = "macOS" ]; then + tox -e py311,py312 + else + pip install tox + tox + fi