From 4b144397780337ecf8f3eb0d67bfec5d2cd4aedb Mon Sep 17 00:00:00 2001 From: Alex Kennedy Date: Fri, 17 Jan 2025 20:50:42 -0800 Subject: [PATCH] chore: Migrate to GHA from CCI (#539) --- .circleci/config.yml | 54 ------------------- .github/workflows/main-release.yaml | 26 +++++++++ ...ython-publish.yml => publish-release.yaml} | 22 ++------ .github/workflows/test.yaml | 24 +++++++++ 4 files changed, 54 insertions(+), 72 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/main-release.yaml rename .github/workflows/{python-publish.yml => publish-release.yaml} (51%) create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 961819bd..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,54 +0,0 @@ -version: 2.1 -executors: - default: - docker: - - image: cimg/python:3.12 -commands: - restore: - steps: - - checkout - - restore_cache: - keys: - - pip-{{ checksum "requirements.txt" }}-{{ checksum "requirements.test.txt" }} -jobs: - venv: - executor: default - steps: - - restore - - run: make venv - - save_cache: - key: pip-{{ checksum "requirements.txt" }}-{{ checksum "requirements.test.txt" }} - paths: - - .venv - lint: - executor: default - steps: - - restore - - run: make lint - test: - executor: default - environment: - USER: bogus-string - steps: - - restore - - run: make test - build: - executor: default - steps: - - restore - - run: make build -workflows: - version: 2 - default: - jobs: - - venv - - lint: - requires: - - venv - - build: - requires: - - venv - - test - - test: - requires: - - venv diff --git a/.github/workflows/main-release.yaml b/.github/workflows/main-release.yaml new file mode 100644 index 00000000..0218f172 --- /dev/null +++ b/.github/workflows/main-release.yaml @@ -0,0 +1,26 @@ +name: main-release +on: + push: + branches: + - main +jobs: + main-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Run make venv + run: make venv + shell: bash + - name: Run make lint + run: make lint + shell: bash + - name: Run make test + run: make test + shell: bash + - name: Run make build + run: make build + shell: bash diff --git a/.github/workflows/python-publish.yml b/.github/workflows/publish-release.yaml similarity index 51% rename from .github/workflows/python-publish.yml rename to .github/workflows/publish-release.yaml index bdaab28a..a9e14d20 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/publish-release.yaml @@ -1,25 +1,11 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - +name: publish-release on: release: - types: [published] - -permissions: - contents: read - + types: + - published jobs: - deploy: - + publish-release: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Set up Python diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..e687904c --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,24 @@ +name: test +on: + pull_request: {} +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Run make venv + run: make venv + shell: bash + - name: Run make lint + run: make lint + shell: bash + - name: Run make test + run: make test + shell: bash + - name: Run make build + run: make build + shell: bash