From 6319b273299d92e675e146e9f5b525e2291ff9a4 Mon Sep 17 00:00:00 2001 From: cipchk Date: Fri, 29 Dec 2023 18:30:43 +0800 Subject: [PATCH] ci: upgrade to GHA --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..15d715842 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: push + +jobs: + # build: + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - uses: actions/cache@v3 + with: + path: ./node_modules + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/*.patch') }} + - name: Install node modules + run: yarn install --immutable --immutable-cache + - name: Test + run: yarn run test + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - uses: actions/cache@v3 + with: + path: ./node_modules + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/*.patch') }} + - name: Install node modules + run: yarn install --immutable --immutable-cache + - name: Check code lint + run: yarn run lint