Skip to content

Commit e41d0cb

Browse files
ci: move ctest.yml to awesome workflow
1 parent b812e20 commit e41d0cb

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

.github/workflows/awesome_workflow.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,39 @@ jobs:
6363
- run: |
6464
cmake -B ./build -S .
6565
cmake --build build --parallel 4
66+
6667
- name: Label on PR fail
67-
uses: actions/github-script@v6
68+
uses: actions-ecosystem/action-add-labels@v1
6869
if: ${{ failure() && matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }}
6970
with:
70-
script: |
71-
github.rest.issues.addLabels({
72-
issue_number: context.issue.number,
73-
owner: context.repo.owner,
74-
repo: context.repo.repo,
75-
labels: ['automated tests are failing']
76-
})
71+
labels: "automated build is failing"
72+
73+
test:
74+
name: Testing pullrequest
75+
runs-on: ${{ matrix.os }}
76+
needs: [build]
77+
78+
permissions:
79+
pull-requests: write
80+
strategy:
81+
matrix:
82+
os: [ubuntu-latest, windows-latest, macOS-latest]
83+
84+
steps:
85+
- name: checkout
86+
uses: actions/checkout@v4
87+
88+
- name: build
89+
run: |
90+
cmake -B build -S . -DBENABLE_TESTING=ON
91+
cmake --build build --parallel 4
92+
93+
- name: test
94+
run: |
95+
ctest build --verbose --timeout 5
96+
97+
- name: Label on PR fail
98+
uses: actions-ecosystem/action-add-labels
99+
if: ${{ failure() && github.event_name == 'pull_request' }}
100+
with:
101+
labels: "automated tests are failing"

.github/workflows/ctest.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)