From 184cad073b3b95307412de361f8ed5f16698a3dd Mon Sep 17 00:00:00 2001 From: Eric Jeker Date: Sun, 9 Jan 2022 17:07:20 +0800 Subject: [PATCH 1/2] feat(github): add github actions --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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 00000000000..5dda98bb791 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: "Continuous Integration" + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + name: "Testing" + needs: lint + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'npm' + - run: npm install + - run: npm run test + lint: + runs-on: ubuntu-latest + name: "Linting" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'npm' + - run: npm install + - run: npm run lint From 0e8a19b2eb87ec26123665834b6d0fe0225d9044 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sun, 9 Jan 2022 19:16:49 +0100 Subject: [PATCH 2/2] chore: apply review suggestions --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dda98bb791..7accdb543c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: "Continuous Integration" on: push: + branches: + - main pull_request: jobs: @@ -15,7 +17,7 @@ jobs: with: node-version: '16' cache: 'npm' - - run: npm install + - run: npm ci - run: npm run test lint: runs-on: ubuntu-latest @@ -26,5 +28,5 @@ jobs: with: node-version: '16' cache: 'npm' - - run: npm install + - run: npm ci - run: npm run lint