From 05d9d7e3ea80619097883bc8274b29e50fb3f5e7 Mon Sep 17 00:00:00 2001 From: Jonas Amundsen Date: Thu, 14 Nov 2024 14:22:44 +0100 Subject: [PATCH] Test package managers --- .github/workflows/package-managers-branch.yml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/package-managers-branch.yml diff --git a/.github/workflows/package-managers-branch.yml b/.github/workflows/package-managers-branch.yml new file mode 100644 index 00000000..bb96081e --- /dev/null +++ b/.github/workflows/package-managers-branch.yml @@ -0,0 +1,71 @@ +name: Package managers (branch) + +on: + push: + branches-ignore: + - master + +env: + EXAMPLE_TO_RUN: webpack-cjs + +jobs: + build-package: + runs-on: ubuntu-latest + container: + image: cypress/base:latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Change owner + run: "chown root: ." + - name: Dependencies + env: + CYPRESS_INSTALL_BINARY: "0" + run: | + npm install + - name: Build + run: npm run build + - name: Pack + run: npm pack + - name: Store dirty build + uses: actions/upload-artifact@v4 + with: + name: build + path: badeball-* + + npm: + needs: + - build-package + runs-on: ubuntu-latest + container: + image: cypress/base:latest + env: + NPM_CONFIG_PACKAGE_LOCK: "false" + steps: + - uses: actions/setup-node@v4 + with: + node-version: latest + - name: Checkout + uses: actions/checkout@v4 + # In lack of native support, https://github.com/actions/checkout/issues/172. + - name: Make checkout sparse + run: | + shopt -s extglob + rm -rf examples/!(${{ env.EXAMPLE_TO_RUN }}) + rm -rf !(examples) + - name: Retrieve dirty build + uses: actions/download-artifact@v4 + with: + name: build + path: examples/${{ env.EXAMPLE_TO_RUN }} + - name: Install NPM modules + working-directory: examples/${{ env.EXAMPLE_TO_RUN }} + run: npm install --engine-strict badeball-* + - name: Run Cypress + working-directory: examples/${{ env.EXAMPLE_TO_RUN }} + run: npx cypress run --e2e + - name: Versions + run: | + npx cypress --version + node --version + npm --version