Skip to content

Commit

Permalink
fix: migrate build workflow only to pnpm
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Golovin <[email protected]>
  • Loading branch information
dgolovin committed Aug 31, 2024
1 parent 6a1cd17 commit 244498d
Show file tree
Hide file tree
Showing 3 changed files with 4,941 additions and 33 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Get yarn cache directory path (Windows)
if: ${{ inputs.runs-on == 'windows-2022' }}
id: yarn-cache-dir-path-windows
run: echo "dir=$(yarn cache dir)" >> ${env:GITHUB_OUTPUT}

- name: Get yarn cache directory path (mac/Linux)
if: ${{ inputs.runs-on == 'ubuntu-22.04' || inputs.runs-on == 'macos-14' }}
id: yarn-cache-dir-path-unix
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
if: ${{ inputs.runs-on == 'windows-2022' }}
id: yarn-cache-windows
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
path: ${{ steps.yarn-cache-dir-path-windows.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
run_install: false

- uses: actions/cache@v4
if: ${{ inputs.runs-on == 'ubuntu-22.04' || inputs.runs-on == 'macos-14' }}
id: yarn-cache-unix
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path-unix.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'pnpm'

- name: Install dependencies (no cache found)
- name: Install dependencies
run: |
yarn --frozen-lockfile --network-timeout 180000
pnpm install
- name: Run Build
timeout-minutes: 20
run: yarn build
run: pnpm build

- name: Login to quay.io
if: ${{ inputs.registry == 'quay' }}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"displayName": "Red Hat Authentication",
"description": "Login to Red Hat Developers",
"version": "1.0.2",
"packageManager": "[email protected]+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247",
"icon": "icon.png",
"publisher": "redhat",
"license": "Apache-2.0",
Expand Down Expand Up @@ -40,9 +41,9 @@
"lint:fix": "node --max-old-space-size=6144 node_modules/eslint/bin/eslint.js --cache . --fix --ext js,ts",
"lint:check": "node --max-old-space-size=6144 node_modules/eslint/bin/eslint.js --cache . --ext js,ts",
"test": "vitest run --coverage",
"test:all": "npm run test && npm run test:e2e",
"test:all": "pnpm test && pnpm test:e2e",
"test:e2e:setup": "xvfb-maybe --auto-servernum --server-args='-screen 0 1280x960x24' --",
"test:e2e": "cross-env E2E_TESTS=true npm run test:e2e:setup vitest run tests/src/ --pool=threads --poolOptions.threads.singleThread --poolOptions.threads.isolate --no-file-parallelism"
"test:e2e": "cross-env E2E_TESTS=true pnpm run test:e2e:setup vitest run tests/src/ --pool=threads --poolOptions.threads.singleThread --poolOptions.threads.isolate --no-file-parallelism"
},
"dependencies": {
"@podman-desktop/api": "^1.12.0",
Expand Down
Loading

0 comments on commit 244498d

Please sign in to comment.