Skip to content

Commit 0bb4ab9

Browse files
committed
Actions: Add integration test for default filter behaviour
Include a reachable workflow, and several unreachable workflow files. Include action metadata files at various depths, all reachable. This test exercises the default filters when the user doesn't specify paths/paths-ignore.
1 parent 37db354 commit 0bb4ab9

File tree

9 files changed

+80
-0
lines changed

9 files changed

+80
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| src/.github/action.yaml:1:1:11:32 | name: ' ... action' |
2+
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
3+
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
4+
| src/action.yml:1:1:11:32 | name: ' ... action' |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import actions
2+
3+
from AstNode n
4+
where n instanceof Workflow or n instanceof CompositeAction
5+
select n
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'A composite action'
2+
description: 'Do something'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Print
7+
run: echo "Hello world"
8+
shell: bash
9+
10+
- name: Checkout
11+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'A composite action'
2+
description: 'Do something'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Print
7+
run: echo "Hello world"
8+
shell: bash
9+
10+
- name: Checkout
11+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: An unreachable workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
job:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: A workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
job:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'A composite action'
2+
description: 'Do something'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Print
7+
run: echo "Hello world"
8+
shell: bash
9+
10+
- name: Checkout
11+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: An unreachable workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
job:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test(codeql, actions):
2+
codeql.database.create(source_root="src")

0 commit comments

Comments
 (0)