From 3ee4698d4c9736f07198046cf117afbee205e73f Mon Sep 17 00:00:00 2001 From: Nihal Gonsalves Date: Mon, 15 Jan 2024 09:23:59 +0100 Subject: [PATCH] ci: add github actions workflow (#303) --- .github/pull_request_template.md | 8 +++---- .github/workflows/build.yml | 41 ++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 7 +++++- package.json | 1 + 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fcda1c3..747e6b6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,9 +25,10 @@ Please also list any relevant details for your test configuration - [ ] Test B **Test Configuration**: -* OS + version: e.g. macOS Mojave -* NPM version: ... -* Node version: ... + +- OS + version: e.g. macOS Mojave +- NPM version: ... +- Node version: ... ## Checklist: @@ -37,6 +38,5 @@ Please also list any relevant details for your test configuration - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules - [ ] I have checked my code and corrected any misspellings diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..80b1e69 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: build +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # waiting on: https://github.com/actions/setup-node/issues/531 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 21 + cache: npm + - run: npm ci + + - name: test build package on node@21 (current) + run: | + node --version + npm --version + npm run test + + # Not using a matrix here since it's simpler + # to just duplicate it and not spawn new instances + + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: test build package on node@20 (LTS) + run: | + node --version + npm --version + npm run test + + - uses: actions/setup-node@v4 + with: + node-version: 18 + - name: test build package on node@18 (LTS) + run: | + node --version + npm --version + npm run test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be87e1c..9cbf0de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,17 @@ # Contributing to `esLint-plugin-tailwindcss` -# Contributing +## Contributing When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. +## Development + +You can use [Corepack](https://nodejs.org/api/corepack.html) to ensure you're using the same package +manager. Run `corepack enabled` before running `npm install`. + ## Pull Request Process 1. Ensure any install or build dependencies are removed before the end of the layer when doing a diff --git a/package.json b/package.json index 2f09da0..53bb1c6 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "typescript": "4.3.5", "vue-eslint-parser": "^9.1.0" }, + "packageManager": "npm@10.2.5+sha256.8002e3e7305d2abd4016e1368af48d49b066c269079eeb10a56e7d6598acfdaa", "engines": { "node": ">=12.13.0" },