From eda8949d51bf0b472d3e9bae5490af3e3d45b5ed Mon Sep 17 00:00:00 2001 From: tommytrg Date: Wed, 14 Aug 2024 18:45:11 +0200 Subject: [PATCH] f ci --- .github/dependabot.yml | 12 +++++++++ .github/workflows/ci.yaml | 53 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ad588c4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + # Fetch and update latest `npm` packages + - package-ecosystem: npm + directory: '/' + schedule: + interval: weekly + # Fetch and update latest `github-actions` pkgs + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: weekly \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..1d00902 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,53 @@ +on: + - push + - pull_request + +jobs: + cache-and-install: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Run linter + run: pnpm lint + + - name: Run formatter + run: pnpm format + + - name: Run unit tests + run: pnpm test:unit + + - name: Run build + run: pnpm build + + - name: Run build storybook + run: pnpm build-storybook \ No newline at end of file