Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add github workflows #389

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions .github/workflows/github-action.yml
Original file line number Diff line number Diff line change
@@ -1,56 +0,0 @@
name: "Specklepy test and build"
on:
pull_request:
branches:
- "v3-dev"
push:
branches:
- "v3-dev"
jobs:
ci:
name: continuous-integration
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"

steps:
- uses: actions/checkout@v4

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install the project
run: uv sync --all-extras --dev

- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: ${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
run: uv run pre-commit run --all-files

# - name: Run Speckle Server
# run: docker compose up -d

# - name: Run tests
# run: uv run pytest --cov --cov-report xml:reports/coverage.xml --junitxml=reports/test-results.xml

# - uses: codecov/codecov-action@v5
# if: matrix.python-version == 3.13
# with:
# fail_ci_if_error: true # optional (default = false)
# files: ./reports/test-results.xml # optional
# token: ${{ secrets.CODECOV_TOKEN }}

- name: Minimize uv cache
run: uv cache prune --ci
33 changes: 0 additions & 33 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
# Publish a release to PyPI.
name: "Publish to PyPI"

on:
workflow_run:
workflows: ["Specklepy test and build"]
branches: [v3-dev]
types:
- completed

jobs:
pypi-publish:
name: Upload to PyPI
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
# For PyPI's trusted publishing.
id-token: write
steps:
- name: "Install uv"
uses: astral-sh/setup-uv@v5
- uses: actions/checkout@v4
with:
# This is necessary so that we have the tags.
fetch-depth: 0
- name: "Build artifacts"
run: uv build
- name: Publish to PyPi
run: uv publish --index test

- name: Test package install
run: uv run --index test --with specklepy --no-project -- python -c "import specklepy"