Skip to content

Commit

Permalink
Use pnpm package manager (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 authored Feb 11, 2022
1 parent 3094543 commit 5b9b776
Show file tree
Hide file tree
Showing 6 changed files with 11,479 additions and 11,927 deletions.
75 changes: 27 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,28 @@ on:
- 'v*'
pull_request: {}

env:
PNPM_VERSION: 5.18.1

jobs:
lint:
name: Linting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2.0.1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-lint-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
version: ${{ env.PNPM_VERSION }}

- name: install dependencies
run: yarn install
- uses: actions/setup-node@v1
with:
node-version: 12.x
cache: pnpm

- name: lint
run: yarn lint
- run: pnpm install
- run: pnpm lint

test:
name: Node Tests
Expand All @@ -46,26 +41,18 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2.0.1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-test-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
version: ${{ env.PNPM_VERSION }}

- name: install dependencies
run: yarn install
- uses: actions/setup-node@v1
with:
node-version: 12.x
cache: pnpm

- name: node tests
run: yarn test --coverage
- run: pnpm install
- run: pnpm test -- --coverage

ember-try-scenarios:
name: Ember Tests
Expand All @@ -74,23 +61,15 @@ jobs:

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x

- name: get yarn cache dir
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2.0.1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-ember-try-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
version: ${{ env.PNPM_VERSION }}

- name: install dependencies
run: yarn install
- uses: actions/setup-node@v1
with:
node-version: 12.x
cache: pnpm

- name: test
run: yarn ember try:each
- run: pnpm install
- run: node_modules/.bin/ember try:each
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@ on:
tags:
- '*'

env:
PNPM_VERSION: 5.18.1

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: pnpm/action-setup@v2.0.1
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- run: npm publish
env:
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
.travis.yml
bower.json
ember-cli-build.js
pnpm-lock.yaml
testem.js
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = {
command: 'yarn run ember test',
useVersionCompatibility: true,
useYarn: true,
usePnpm: true,
scenarios: [{
name: 'ember-release',
allowedToFail: true,
Expand Down
Loading

0 comments on commit 5b9b776

Please sign in to comment.