From d472d90d5d9034f413843c0ae19b3290dfc15cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Tue, 19 Mar 2024 11:20:16 +0100 Subject: [PATCH 1/2] [#507] chore: add frontend test github workflow Set up test_frontend workflow to dispatch automated tests on every pull request. --- .github/workflows/test_frontentd.yml | 31 ++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/test_frontentd.yml diff --git a/.github/workflows/test_frontentd.yml b/.github/workflows/test_frontentd.yml new file mode 100644 index 000000000..a98de2266 --- /dev/null +++ b/.github/workflows/test_frontentd.yml @@ -0,0 +1,31 @@ +name: Frontend Test + +on: + push: + paths: + - govtool/frontend/** + - .github/workflows/test_frontend.yml + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: govtool/frontend/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }} + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "18.x" + + - name: Run Frontend Test + working-directory: govtool/frontend + run: | + npm install + npm run test diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e53fc05e..66f7e2413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ changes. - Add on-chain inputs validation [Issue 377](https://github.com/IntersectMBO/govtool/issues/377) - Add hash and validation of the metadata [Issue 378](https://github.com/IntersectMBO/govtool/issues/378) - Add githubusercontent.com and ipfs.io to content security policy header [Issue 451](https://github.com/IntersectMBO/govtool/issues/451) +- Add frontend test workflow on github actions [Issue 500](https://github.com/IntesectMBO/govtool/issues/500) ### Added From 4cda4701028e40c7f46ebb6f53c2033351fc2b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Tue, 19 Mar 2024 11:37:17 +0100 Subject: [PATCH 2/2] [#507] chore: change file name --- .github/workflows/{test_frontentd.yml => test_frontend.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test_frontentd.yml => test_frontend.yml} (100%) diff --git a/.github/workflows/test_frontentd.yml b/.github/workflows/test_frontend.yml similarity index 100% rename from .github/workflows/test_frontentd.yml rename to .github/workflows/test_frontend.yml