From c3c3108328bbea3cbfa0e8be517de369158fd0b1 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 22 Oct 2023 22:41:14 +0800 Subject: [PATCH] ci: bring up --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7df460a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Lint and Test +on: + push: + pull_request: + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js LTS + uses: actions/setup-node@v3 + with: + node-version: lts + cache: npm + - name: Install dependencies + run: npm install + - name: Lint + run: npm run lint + test: + strategy: + matrix: + node: [14.x, 16.x, 18.x, 20.x, latest] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: npm + - run: npm install + - run: npm test