From 2ffbe99a2b1a8e1591c4556df793899149393cb3 Mon Sep 17 00:00:00 2001 From: getlarge Date: Wed, 16 Feb 2022 07:56:28 +0100 Subject: [PATCH 1/2] ci: create GH workflow --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 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 0000000..409ea3f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: CI + +on: + push: + branches: + - main + paths-ignore: + - README.md + - API.md + - docs/*.rst + pull_request: + branches: + - main + types: + - ready_for_review + - opened + - reopened + - synchronize + paths-ignore: + - README.md + - API.md + - docs/*.rst + +jobs: + test: + runs-on: ubuntu-latest + if: github.event_name == 'release' || github.event_name == 'push' || !github.event.pull_request.draft + timeout-minutes: 10 + + steps: + - name: Checkout the commit + uses: actions/checkout@v2 + + - name: Set up Node + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Cache dependencies + id: cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + env: + HUSKY_SKIP_INSTALL: 'true' + run: npm install + + - name: Lint + run: npm run lint + + - name: Build + run: npm run build + + - name: Build docker + run: | + echo Building and starting up docker containers + docker-compose -f ./docker-compose.yml up + + - name: Test + run: npm run test From 1864f6fbb4010da8f85cad1fc7b763e5e454ab16 Mon Sep 17 00:00:00 2001 From: getlarge Date: Wed, 16 Feb 2022 07:57:31 +0100 Subject: [PATCH 2/2] ci: update watched branch --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 409ea3f..2583ffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,14 @@ name: CI on: push: branches: - - main + - master paths-ignore: - README.md - API.md - docs/*.rst pull_request: branches: - - main + - master types: - ready_for_review - opened