Skip to content

Commit

Permalink
build(pnpm): Use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Mar 8, 2021
1 parent c0f27c7 commit 4e2d201
Show file tree
Hide file tree
Showing 44 changed files with 15,524 additions and 81,113 deletions.
59 changes: 30 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,61 @@ on:
push:
pull_request:

env:
PNPM_CACHE_FOLDER: ~/.pnpm-store

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.PNPM_CACHE_FOLDER }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: npm run lint
${{ runner.os }}-pnpm-
- uses: pnpm/action-setup@v1.2.1
with:
version: 5.17.2
- run: pnpm config set store-dir ${{ env.PNPM_CACHE_FOLDER }}
- run: pnpm install
- run: pnpm run build
- run: pnpm run lint
test:
runs-on: ${{ matrix.os }}
needs:
- lint
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
os: [ubuntu-latest, windows-latest]
os: [ubuntu-20.04, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.PNPM_CACHE_FOLDER }}
key: ${{ runner.os }}-pnpm-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run bootstrap
- run: npm run build
${{ runner.os }}-pnpm-${{ matrix.node-version }}-
- uses: pnpm/action-setup@v1.2.1
with:
version: 5.17.2
- run: pnpm config set store-dir ${{ env.PNPM_CACHE_FOLDER }}
- run: pnpm install
- run: pnpm run build
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
- name: Set TEMP on Windows
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: ${{ runner.os == 'Windows' }}
- run: npm run test:unit -- --coverage
- run: npm run test:integration
- run: pnpm run test:unit -- --coverage
- run: pnpm run test:integration
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
203 changes: 0 additions & 203 deletions examples/alternative-folder-structure/package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions examples/alternative-folder-structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"@kosko/env": "^1.0.1",
"kosko": "^1.0.1",
"@kosko/env": "workspace:*",
"kosko": "workspace:*",
"kubernetes-models": "^1.0.3"
}
}
Loading

0 comments on commit 4e2d201

Please sign in to comment.