Skip to content

Commit ffcdd82

Browse files
committed
ci: run tests on PRs
Previously the checks were only run on branches pushed to the xcp-ng repo, or, when a branch is pushed to a forked repo, against that fork, if it has been configured to run GH actions. This resulted in PRs for branches in a forked repo not to trigger the test actions, and we would miss any regression while the PR is open, and only get hit when the regression hits master. Just activating those actions on pull_request in addition to push would OTOH have them run twice when we push a PR branch, so we restrict the runs on push to only happen when pushing to master. This has a side-effect of non-PR branches not getting the checks run, which we may want to fix in the future. Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
1 parent 14eb61e commit ffcdd82

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/format.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Check coding style
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
48

59
jobs:
610
pycodestyle:

.github/workflows/main.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Test build env
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
48

59
jobs:
610
test:

0 commit comments

Comments
 (0)