diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 0000000..db9e331 --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,13 @@ +name: Setup Node.js +description: Setup Node.js + +runs: + using: "composite" + steps: + - uses: actions/setup-node@v4 + name: Setup Node.js + with: + node-version-file: .nvmrc + - name: Install dependencies + run: npm i + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d10957d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: [push] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + name: Checkout + with: + fetch-depth: 0 + - uses: ./.github/actions/setup-node + - name: Build + run: npm run build + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + name: Checkout + with: + fetch-depth: 0 + - uses: ./.github/actions/setup-node + - name: Test + run: npm test