Skip to content

Commit

Permalink
Test package managers
Browse files Browse the repository at this point in the history
  • Loading branch information
badeball committed Nov 14, 2024
1 parent 1a87ddd commit c412450
Showing 1 changed file with 153 additions and 0 deletions.
153 changes: 153 additions & 0 deletions .github/workflows/package-managers-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Package managers (branch)

on:
push:
branches-ignore:
- master

defaults:
run:
shell: bash

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
pnpm:
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: Install pnpm
run: npm install --global pnpm@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: pnpm install --engine-strict badeball-*
- name: Run Cypress
working-directory: examples/${{ env.EXAMPLE_TO_RUN }}
run: pnpm exec cypress run --e2e
- name: Versions
run: |
pnpm exec cypress --version
node --version
pnpm --version
yarn:
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: Install yarn
run: npm install --global yarn@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: yarn install --engine-strict badeball-*
- name: Run Cypress
working-directory: examples/${{ env.EXAMPLE_TO_RUN }}
run: yarn exec cypress run --e2e
- name: Versions
run: |
yarn exec cypress --version
node --version
yarn --version

0 comments on commit c412450

Please sign in to comment.