mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-02 03:50:55 +00:00
build: initialize JavaScript Action project (#69)
* build: initialize JavaScript action project * chore(dependabot): check for npm package updates * style: ignore `main` dir and `README.md` from being formatted * ci: add Build workflow that contains Build Package job * ci: add Test Package job in the Test workflow * test: add an empty `main.test.ts` test * chore: adjust Git attributes for `main/index.mjs` file * docs(readme): add a build status badge
This commit is contained in:
9
.github/dependabot.yaml
vendored
9
.github/dependabot.yaml
vendored
@@ -7,3 +7,12 @@ updates:
|
||||
commit-message:
|
||||
prefix: chore
|
||||
labels: [chore]
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
commit-message:
|
||||
prefix: chore
|
||||
labels: [chore]
|
||||
versioning-strategy: increase
|
||||
|
||||
39
.github/workflows/build.yaml
vendored
Normal file
39
.github/workflows/build.yaml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
build-package:
|
||||
name: Build Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4.0.0
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Update Yarn
|
||||
run: corepack enable && yarn set version stable
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: .yarn
|
||||
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
|
||||
- name: Install deps
|
||||
run: yarn install
|
||||
|
||||
- name: Check lib
|
||||
run: yarn check
|
||||
|
||||
- name: Bundle dist
|
||||
run: yarn bundle
|
||||
|
||||
- name: Check diff
|
||||
run: git diff --exit-code HEAD
|
||||
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
@@ -5,6 +5,36 @@ on:
|
||||
push:
|
||||
branches: [latest, main]
|
||||
jobs:
|
||||
test-package:
|
||||
name: Test Package
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows, ubuntu, macos]
|
||||
env:
|
||||
NODE_OPTIONS: --experimental-vm-modules
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4.0.0
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Cache deps
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: .yarn
|
||||
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
|
||||
- name: Install deps
|
||||
run: corepack enable && yarn install
|
||||
|
||||
- name: Test lib
|
||||
run: yarn test
|
||||
|
||||
default-usage:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user