Skip to content

Commit

Permalink
Merge pull request #78 from LevelbossMike/ci-with-pnpm
Browse files Browse the repository at this point in the history
Support pnpm in GitHub workflow
  • Loading branch information
simonihmig committed Nov 27, 2022
2 parents d5a70a2 + 15924e8 commit 86f93af
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions files/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,40 @@ jobs:

steps:
- uses: actions/checkout@v3
<% if (pnpm) {%>- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7<%}%>
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: <%= yarn ? 'yarn' : 'npm' %>
cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
- name: Install Dependencies
run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
- name: Lint
run: <%= yarn ? 'yarn' : 'npm run' %> lint
run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> lint
- name: Run Tests
run: <%= yarn ? 'yarn' : 'npm run' %> test
run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
<% if (pnpm) {%>- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7<%}%>
- uses: actions/setup-node@v3
with:
node-version: 14.x
cache: <%= yarn ? 'yarn' : 'npm' %>
cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
- name: Install Dependencies
run: <%= yarn ? 'yarn install --no-lockfile' : 'npm install --no-shrinkwrap' %>
run: <%= pnpm ? 'pnpm install --no-lockfile' : yarn ? 'yarn install --no-lockfile' : 'npm install --no-shrinkwrap' %>
- name: Run Tests
run: <%= yarn ? 'yarn' : 'npm run' %> test
run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> test

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand All @@ -65,13 +73,17 @@ jobs:

steps:
- uses: actions/checkout@v3
<% if (pnpm) {%>- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7<%}%>
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: <%= yarn ? 'yarn' : 'npm' %>
cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
- name: Install Dependencies
run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: <%= testAppInfo.location %>

0 comments on commit 86f93af

Please sign in to comment.