Skip to content

Commit bd3342a

Browse files
committed
Actions: Update integration test for default filters
Create a common file structure to be shared among multiple tests for path filters, and rename accordingly. Update test expectations with additional files. Use pytest markers to indicate the expected outputs. Add source archive checking in addition to checking query output. This allows us to test which YAML files were extracted separately from whether they are semantically meaningful to the Actions analysis.
1 parent 0e31bf1 commit bd3342a

File tree

16 files changed

+66
-2
lines changed

16 files changed

+66
-2
lines changed

actions/ql/integration-tests/filters-default/test.py

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

actions/ql/integration-tests/filters-default/actions.expected renamed to actions/ql/integration-tests/filters/actions.default-filters.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
33
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
44
| src/action.yml:1:1:11:32 | name: ' ... action' |
5+
| src/excluded/action.yml:1:1:11:32 | name: ' ... action' |
6+
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
Lines changed: 5 additions & 0 deletions
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
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
src/.github/action.yaml
2+
src/.github/actions/action-name/action.yml
3+
src/.github/workflows/workflow.yml
4+
src/action.yml
5+
src/excluded/action.yml
6+
src/included/action.yml
Lines changed: 11 additions & 0 deletions
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

0 commit comments

Comments
 (0)