Skip to content

Commit

Permalink
Add VCL test data for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ain committed Dec 8, 2023
1 parent 99152f7 commit 757e8d3
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- main

jobs:
build:
runs-on: ubuntu-20.04
acl:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -52,3 +52,41 @@ jobs:
#with:
#subcommand: lint
#target: test/acl/invalid_syntax.acl
vcl:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run Falco on valid VCL
uses: ./
with:
subcommand: lint
target: test/vcl/valid.vcl

- name: Run Falco on valid VCL with verbosity
uses: ./
with:
subcommand: lint
verbosity: -v
target: test/vcl/valid.vcl

- name: Run Falco on valid VCL with most verbosity
uses: ./
with:
subcommand: lint
verbosity: -vv
target: test/vcl/valid.vcl

- name: Run Falco on valid VCL with include
uses: ./
with:
subcommand: lint
include: test/vcl/included_items.vcl
target: test/vcl/valid.vcl

#- name: Run Falco on invalid VCL
#uses: ./
#with:
#subcommand: lint
#target: test/vcl/invalid_syntax.acl
4 changes: 4 additions & 0 deletions test/vcl/included_items.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
table included_items {
"item1": "true",
"item2": "false"
}
34 changes: 34 additions & 0 deletions test/vcl/valid.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

sub vcl_recv {
#FASTLY recv
}

sub vcl_fetch {
#FASTLY fetch

}

sub vcl_hit {
#FASTLY hit
}

sub vcl_miss {
#FASTLY miss
}

sub vcl_deliver {
#FASTLY deliver
return(deliver);
}

sub vcl_error {
#FASTLY error
}

sub vcl_pass {
#FASTLY pass
}

sub vcl_log {
#FASTLY log
}
1 change: 1 addition & 0 deletions test/vcl/valid_with_include.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include "included_items";

0 comments on commit 757e8d3

Please sign in to comment.