Skip to content

Commit

Permalink
Update the CI workflow like in PyCyphal
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Jun 28, 2024
1 parent e489e20 commit 9d3af2a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Test and Release PyDSDL'
on: push
on: [ push, pull_request ]

# Ensures that only one workflow is running at a time
concurrency:
Expand All @@ -9,6 +9,9 @@ concurrency:
jobs:
pydsdl-test:
name: Test PyDSDL
# Run on push OR on 3rd-party PR.
# https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request
if: (github.event_name == 'push') || github.event.pull_request.head.repo.fork
strategy:
fail-fast: false
matrix:
Expand All @@ -22,10 +25,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Check out pydsdl
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check out public_regulated_data_types
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: OpenCyphal/public_regulated_data_types
path: .dsdl-test
Expand Down Expand Up @@ -64,12 +67,14 @@ jobs:

pydsdl-release:
name: Release PyDSDL
if: contains(github.event.head_commit.message, '#release') || contains(github.ref, '/master')
if: >
(github.event_name == 'push') &&
(contains(github.event.head_commit.message, '#release') || contains(github.ref, '/master'))
needs: pydsdl-test
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build distribution
run: |
Expand Down

0 comments on commit 9d3af2a

Please sign in to comment.