Skip to content
Merged
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
105 changes: 63 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,88 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
release-change:
name: Detect release merge
runs-on: ubuntu-latest
outputs:
is-release: ${{ steps.release.outputs.is-release }}
steps:
- uses: compas-dev/compas-actions/release-check@v1
id: release

unit-tests:
needs: release-change
if: github.event_name == 'pull_request' || needs.release-change.outputs.is-release != 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.10', '3.11', '3.12']

python: ["3.10", "3.11", "3.12"]
steps:
- uses: compas-dev/compas-actions.build@v4
- uses: compas-dev/compas-actions/ci@v1
with:
python: ${{ matrix.python }}
invoke_lint: true
invoke_test: false
python-version: ${{ matrix.python }}
management-tool: uv
invoke-tasks: lint

- name: Run unit tests
run: |
pytest tests/unit
run: pytest tests/unit

integration_tests:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: 'ubuntu-latest'
integration-tests:
needs: release-change
if: github.event_name == 'pull_request' || needs.release-change.outputs.is-release != 'true'
runs-on: ubuntu-latest
steps:
- name: Set up docker containers
- name: Start test services
run: |
docker run -d --name nanomq -p 1883:1883 -p 8083:8083 -p 8883:8883 emqx/nanomq:latest
docker run -d --name zenoh --init -p 7447:7447/tcp -p 8000:8000/tcp eclipse/zenoh
docker ps -a
- uses: compas-dev/compas-actions.build@v4

- uses: compas-dev/compas-actions/ci@v1
with:
python: '3.11'
invoke_lint: false
invoke_test: false
- name: Install test dependencies
run: |
pip install -r tests/integration/requirements.txt
python-version: "3.11"
management-tool: uv
invoke-tasks: ""

- name: Install integration-test dependencies
run: uv pip install --system -r tests/integration/requirements.txt

- name: Run integration tests
run: |
pytest tests/integration
- name: Tear down docker container
run: |
docker rm -f nanomq
docker rm -f zenoh
run: pytest tests/integration

build-cpython-components:
runs-on: windows-latest
- name: Stop test services
if: always()
run: docker rm -f nanomq zenoh || true

components:
needs: release-change
if: github.event_name == 'pull_request' || needs.release-change.outputs.is-release != 'true'
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- uses: compas-dev/compas-actions/setup-python@v1
with:
python-version: "3.12"
management-tool: uv
extras: dev

- name: Create CPython Grasshopper user objects
run: |
invoke build-cpython-ghuser-components
- uses: compas-dev/compas-actions/ghpython-components@v1
with:
source: src/compas_eve/ghpython/components
target: src/compas_eve/ghpython/components/ghuser
prefix: "COMPAS EVE: "

- uses: actions/upload-artifact@v5
with:
name: compas_eve_components
path: src/compas_eve/ghpython/components/ghuser
- uses: actions/upload-artifact@v7.0.1
with:
name: compas-eve-components
path: src/compas_eve/ghpython/components/ghuser/*.ghuser
if-no-files-found: error
22 changes: 0 additions & 22 deletions .github/workflows/docs.yml

This file was deleted.

25 changes: 15 additions & 10 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: verify-pr-checklist

on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- master

permissions:
contents: read

jobs:
build:
name: Check Actions
release:
name: Validate release metadata
runs-on: ubuntu-latest
steps:
- uses: compas-dev/compas-actions/release-check@v1

changelog:
name: Check changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Changelog check
uses: Zomzog/changelog-checker@v1.2.0
- uses: compas-dev/compas-actions/pr-checks@v1
with:
fileName: CHANGELOG.md
checkNotification: Simple
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog-path: CHANGELOG.md
skip-label: no changelog
26 changes: 26 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: prepare release

on:
workflow_dispatch:
inputs:
release-type:
description: Semantic version component to bump
required: true
type: choice
options:
- patch
- minor
- major

permissions:
contents: write
pull-requests: write

jobs:
release-pr:
runs-on: ubuntu-latest
steps:
- uses: compas-dev/compas-actions/release-pr@v1
with:
release-type: ${{ inputs.release-type }}
github-token: ${{ github.token }}
Loading