-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.05 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Test
on:
pull_request:
push:
branches: [ main ]
workflow_dispatch:
jobs:
setup:
if: github.event_name == 'pull_request' || !(github.event_name == 'push' && github.ref == 'refs/heads/main')
outputs:
branch: ${{ steps.set_branch_variable.outputs.branch }}
runs-on: ubuntu-latest
steps:
- id: set_branch_variable
name: Set Branch Variable
uses: emmahsax/github-actions/set-branch-variable@main
gitleaks:
uses: emmahsax/github-actions/.github/workflows/gitleaks.yml@main
rspec:
if: github.event_name == 'pull_request' || !(github.event_name == 'push' && github.ref == 'refs/heads/main')
needs: [ setup ]
uses: emmahsax/github-actions/.github/workflows/rspec.yml@main
with:
branch: ${{ needs.setup.outputs.branch }}
rubocop:
if: github.event_name == 'pull_request' || !(github.event_name == 'push' && github.ref == 'refs/heads/main')
needs: [ setup ]
uses: emmahsax/github-actions/.github/workflows/rubocop.yml@main
with:
branch: ${{ needs.setup.outputs.branch }}