diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3707a8f..200b751 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ on: - main jobs: - build: - runs-on: ubuntu-20.04 + acl: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -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 diff --git a/test/vcl/included_items.vcl b/test/vcl/included_items.vcl new file mode 100644 index 0000000..5cca930 --- /dev/null +++ b/test/vcl/included_items.vcl @@ -0,0 +1,4 @@ +table included_items { + "item1": "true", + "item2": "false" +} diff --git a/test/vcl/valid.vcl b/test/vcl/valid.vcl new file mode 100644 index 0000000..c66773e --- /dev/null +++ b/test/vcl/valid.vcl @@ -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 +} diff --git a/test/vcl/valid_with_include.vcl b/test/vcl/valid_with_include.vcl new file mode 100644 index 0000000..2d7e20e --- /dev/null +++ b/test/vcl/valid_with_include.vcl @@ -0,0 +1 @@ +include "included_items";