From c136f9420a70dd71bdf306d8d70a4fa45064a121 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Sun, 23 Feb 2025 11:14:47 -0500 Subject: [PATCH] Add GitHub Actions workflow for pull requests (#76) * Add GitHub Actions workflow for pull requests This PR adds a GitHub Actions workflow to run `pytest` on pull requests. This will help ensure no breaking changes are introduced into the library. GitHub Actions is free for public repositories on GitHub. * try python `3.10` --- .github/workflows/pr.yaml | 20 ++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..7e83bc8 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,20 @@ +name: pr + +on: pull_request + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install dependencies + # TODO: move test dependencies to a separate file + run: | + python -m pip install -e . + python -m pip install pytest mock + - name: Run pytest + run: pytest diff --git a/.gitignore b/.gitignore index b658468..08c530e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ tmp bin/ad2-test *~ .vscode +venv +.venv