Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
Update all workflow
Fix release bump version commit

fixes: #53
  • Loading branch information
Sukaato committed Oct 7, 2024
1 parent 69b5960 commit bc98dac
Show file tree
Hide file tree
Showing 62 changed files with 381 additions and 579 deletions.
17 changes: 1 addition & 16 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
#!/bin/bash

function check() {
npx -w @poppy-ui/$1 @biomejs/biome $2

if (( $? != 0 )); then
echo "Forgot to run $2 on $1 ?"
exit 1
fi
}

# Core
check "core" "format"
check "core" "lint"

# Vue
check "vue" "format"
check "vue" "lint"
npx @biomejs/biome ci
18 changes: 0 additions & 18 deletions .github/workflows/actions/audit/action.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/actions/build/action.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/actions/bump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
id: bump-ver
if: inputs.preid == ''
run: |
npm version ${{ inputs.version }} -ws --include-workspace-root --no-git-tag-version -m"ci(version): bump to v%s"
npm version ${{ inputs.version }} -ws --include-workspace-root --no-git-tag-version
version=v$(npm version --json | jq -r '.root')
git add .
echo "version=$version" >> $GITHUB_OUTPUT
Expand All @@ -35,7 +35,7 @@ runs:
id: bump-pre
if: inputs.preid != ''
run: |
npm version ${{ inputs.version }} --preid=${{ inputs.preid }} -ws --include-workspace-root --no-git-tag-version -m"ci(version): bump to v%s"
npm version ${{ inputs.version }} --preid=${{ inputs.preid }} -ws --include-workspace-root --no-git-tag-version
version=v$(npm version --json | jq -r '.root')
git add .
echo "version=$version" >> $GITHUB_OUTPUT
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/actions/quality/action.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/assign-issues.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/audit-vue.yml

This file was deleted.

21 changes: 13 additions & 8 deletions .github/workflows/audit-core.yml → .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Audit - Core
name: Audit

on:
workflow_call:
push:
branches:
- main
paths:
- packages/core/**
- packages/**
pull_request:
branches:
- main
paths:
- packages/core/**
- packages/**
schedule:
# Run every Monday-Friday
# at 6:00 UTC (6:00 am UTC)
Expand All @@ -20,15 +21,19 @@ on:
# cancel the previous test run to not
# consume more runners than we need to.
concurrency:
group: ${{ github.ref }}_audit_core
group: ${{ github.ref }}_audit
cancel-in-progress: true

jobs:
audit:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- core
- vue
steps:
- uses: actions/checkout@v4
- name: Audit
uses: ./.github/workflows/actions/audit
with:
package: core
- name: Audit ${{ matrix.package }}
run: npx -w @poppy-ui/${{ matrix.package }} audit-ci@latest --config ./audit-ci.json
shell: bash
36 changes: 11 additions & 25 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build - Core

on:
Expand All @@ -23,36 +20,25 @@ concurrency:
cancel-in-progress: true

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Audit
uses: ./.github/workflows/actions/audit
with:
package: core

quality:
needs: audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/quality
with:
package: core

build:
needs: quality
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 22.x
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/build

- name: Setup Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
package: core
node-version: ${{ matrix.node-version }}

- name: Install
run: npm install -w @poppy-ui/core
shell: bash

- name: Build
run: npm run build -w @poppy-ui/core --if-present
shell: bash
Loading

0 comments on commit bc98dac

Please sign in to comment.