diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b00c76e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build + +on: + push: + paths: + - '.github/workflows/build.yml' + - 'src/**/*.ts' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - 'vite.config.ts' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - run: npm ci + - run: npm run build diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000..e9aa384 --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,22 @@ +name: Check for un-formatted files + +on: + push: + paths: + - '.editorconfig' + - '**/*.js' + - '**/*.json' + - '**/*.md' + - '**/*.ts' + - '**/*.yml' + +jobs: + format-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.15.0 + - run: npm ci + - run: npm run format:check diff --git a/.github/workflows/ci.yml b/.github/workflows/lint.yml similarity index 73% rename from .github/workflows/ci.yml rename to .github/workflows/lint.yml index e399c3c..23ca9cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/lint.yml @@ -1,19 +1,18 @@ -name: CI +name: Lint on: push: paths: - - '.github/workflows/**' + - '.github/workflows/lint.yml' - 'src/**/*.ts' - '.editorconfig' - 'eslint.config.js' - 'package.json' - - 'package-lock.json' - 'tsconfig.json' - 'vite.config.ts' jobs: - ci: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,6 +20,4 @@ jobs: with: node-version: 16.15.0 - run: npm ci - - run: npm run build - run: npm run lint - - run: npm run format:check