From 59339d3210b15508c12fa9ea86700f18887214c0 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Sun, 23 Feb 2025 11:08:33 -0500 Subject: [PATCH 1/2] 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. --- .github/workflows/pr.yaml | 17 +++++++++++++++++ .gitignore | 2 ++ 2 files changed, 19 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..d26c812 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,17 @@ +name: pr + +on: pull_request + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - 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 From 06f8b2ce05119878ff3d113f13d3529b9857d8bf Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Sun, 23 Feb 2025 11:13:29 -0500 Subject: [PATCH 2/2] try python `3.10` --- .github/workflows/pr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d26c812..7e83bc8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,6 +8,9 @@ jobs: 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: |