Skip to content

Commit

Permalink
Fix error with ci pipline (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Gaudin authored Jul 4, 2024
2 parents 48abf28 + 73ac187 commit 43e07d6
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 158 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Changesets

on:
push:
branches: [ "main" ]
push:
branches: [ "main" ]
env:
CI: true
CI: true

jobs:
version:
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Create release Pull Request or publish to NPM
uses: changesets/action@v1
with:
commit: "ci(changesets): version packages"
title: "Changeset: New Version"
publish: pnpm run ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}
version:
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Create release Pull Request or publish to NPM
uses: changesets/action@v1
with:
commit: "ci(changesets): version packages"
title: "Changeset: New Version"
publish: pnpm run ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}
124 changes: 62 additions & 62 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,77 @@
name: Chromatic

on:
push:
branches:
- main
pull_request:
# Workflows will not run on pull_request activity if the pull request has a merge conflict. The merge conflict must be resolved first.
# By default, a workflow only runs when a pull_request event's activity type is opened, synchronize, or reopened.
branches-ignore:
- changeset-release/*
push:
branches:
- main
pull_request:
# Workflows will not run on pull_request activity if the pull request has a merge conflict. The merge conflict must be resolved first.
# By default, a workflow only runs when a pull_request event's activity type is opened, synchronize, or reopened.
branches-ignore:
- changeset-release/*

concurrency:
group: chromatic-${{ github.head_ref || github.ref }}
cancel-in-progress: true
group: chromatic-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
chromatic:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0
chromatic:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Commit
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build Packages
run: pnpm build:pkg
- name: Build Packages
run: pnpm build:pkg

- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
traceChanged: true
onlyChanged: true # TurboSnap
exitOnceUploaded: true # The PRs will be marked as success/failure based on the Chromatic build status
skip: ${{ github.event.pull_request.draft == true }}
- name: Publish to Chromatic
uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
traceChanged: true
onlyChanged: true # TurboSnap
exitOnceUploaded: true # The PRs will be marked as success/failure based on the Chromatic build status
skip: ${{ github.event.pull_request.draft == true }}

- name: Write to Github comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
[View Storybook](${{ steps.chromatic.outputs.storybookUrl }})
comment_tag: storybook_url
if: github.event_name == 'pull_request'
- name: Write to Github comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
[View Storybook](${{ steps.chromatic.outputs.storybookUrl }})
comment_tag: storybook_url
if: github.event_name == 'pull_request'
88 changes: 44 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,63 @@ name: CI
# Pnpm setup based on https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CI: true
CI: true

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 9
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build packages
run: pnpm build:pkg
- name: Build packages
run: pnpm build:pkg

- name: Build apps
run: pnpm build:apps
- name: Build apps
run: pnpm build:apps

- name: Lint packages
run: pnpm lint
- name: Lint packages
run: pnpm lint

- name: Test packages
run: pnpm test
- name: Test packages
run: pnpm test

0 comments on commit 43e07d6

Please sign in to comment.