From 1f709678403b49adc9c902f371fb7e88283f34cd Mon Sep 17 00:00:00 2001 From: Lewis Wright Date: Mon, 12 Aug 2024 11:12:26 +0100 Subject: [PATCH 1/2] Add PR pipeline --- .github/workflows/pr.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..2a8addf --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,23 @@ +# This workflow will run tests and build when a pull request is opened or reopened + +name: PR + +on: + # Triggers the workflow on push or pull request events but only for the master branch + pull_request: + types: [opened, reopened] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - run: npm test -- run + - run: npm run build \ No newline at end of file From de47690b8c57a5597fc4c3f389f3fcb423ed3493 Mon Sep 17 00:00:00 2001 From: Lewis Wright Date: Mon, 12 Aug 2024 11:13:27 +0100 Subject: [PATCH 2/2] Update job name --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2a8addf..434e7fa 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ on: types: [opened, reopened] jobs: - publish-npm: + test-and-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4