Skip to content

Commit

Permalink
Use a maintained action for "changed files"
Browse files Browse the repository at this point in the history
And replace "dummy" with "sample" in go tests to make `woke` happy :)

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester authored and tekton-robot committed Nov 15, 2023
1 parent a7edd28 commit fd41253
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 233 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2

- uses: jitterbit/get-changed-files@v1
id: files
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
write_output_files: true
files: |
**
- name: 'woke'
if: steps.changed-files.outputs.any_changed == 'true'
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true
# See https://github.com/marketplace/actions/get-all-changed-files
# for more options
woke-args: ${{ steps.files.outputs.added_modified }}
woke-args: ${{ steps.changed_files.outputs.all_changed_files }}
2 changes: 2 additions & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
go.mod
go.sum
vendor
config/dummy.go
.wokeignore
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1beta1/resource_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
var (
prependStep = v1beta1.Step{
Name: "prepend-step",
Image: "dummy",
Image: "sample",
Command: []string{"doit"},
Args: []string{"stuff", "things"},
}
appendStep = v1beta1.Step{
Name: "append-step",
Image: "dummy",
Image: "sample",
Command: []string{"doit"},
Args: []string{"other stuff", "other things"},
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/reconciler/pipelinerun/resources/pipelineref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ import (
)

var (
dummyPipeline = &v1.Pipeline{
samplePipeline = &v1.Pipeline{
ObjectMeta: metav1.ObjectMeta{
Name: "dummy",
Name: "sample",
Namespace: "default",
},
TypeMeta: metav1.TypeMeta{
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestLocalPipelineRef(t *testing.T) {
}{
{
name: "local-pipeline",
pipelines: []runtime.Object{simplePipeline(), dummyPipeline},
pipelines: []runtime.Object{simplePipeline(), samplePipeline},
ref: &v1.PipelineRef{
Name: "simple",
},
Expand Down Expand Up @@ -191,9 +191,9 @@ func TestGetPipelineFunc_Local(t *testing.T) {
name: "local-pipeline",
localPipelines: []runtime.Object{
simplePipelineWithBaseSpec(),
dummyPipeline,
samplePipeline,
},
remotePipelines: []runtime.Object{simplePipeline(), dummyPipeline},
remotePipelines: []runtime.Object{simplePipeline(), samplePipeline},
ref: &v1.PipelineRef{
Name: "simple",
},
Expand Down Expand Up @@ -240,7 +240,7 @@ func TestGetPipelineFuncSpecAlreadyFetched(t *testing.T) {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
defer cancel()
tektonclient := fake.NewSimpleClientset(simplePipeline(), dummyPipeline)
tektonclient := fake.NewSimpleClientset(simplePipeline(), samplePipeline)
kubeclient := fakek8s.NewSimpleClientset(&corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Namespace: "default",
Expand Down
Loading

0 comments on commit fd41253

Please sign in to comment.