diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b0712d3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: test + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + workflow_dispatch: + +jobs: + directory: + runs-on: ubuntu-latest + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Targets specific directory + uses: ./ + with: + directory: "tests/action/directory/a/*" + + - name: Compare the minified files + run: git diff --exit-code diff --git a/tests/action/directory/a/a.js b/tests/action/directory/a/a.js new file mode 100644 index 0000000..1fd79f6 --- /dev/null +++ b/tests/action/directory/a/a.js @@ -0,0 +1,7 @@ +function print_hello() { + console.log('hello world from a'); +} + +window.addEventListener('load', function () { + print_hello(); +}); diff --git a/tests/action/directory/a/a.min.js b/tests/action/directory/a/a.min.js new file mode 100644 index 0000000..e939a8a --- /dev/null +++ b/tests/action/directory/a/a.min.js @@ -0,0 +1 @@ +function print_hello(){console.log("hello world from a")}window.addEventListener("load",function(){print_hello()}); \ No newline at end of file diff --git a/tests/action/directory/b/b.js b/tests/action/directory/b/b.js new file mode 100644 index 0000000..1bdde8d --- /dev/null +++ b/tests/action/directory/b/b.js @@ -0,0 +1,7 @@ +function print_hello() { + console.log('hello world from b'); +} + +window.addEventListener('load', function () { + print_hello(); +});