From 0c9c60f9e39912e5f7bb9615544a1b5b26bcbaa1 Mon Sep 17 00:00:00 2001 From: Kamino <67395018+err931@users.noreply.github.com> Date: Sun, 31 Jan 2021 14:54:09 +0900 Subject: [PATCH] Create actions-loadtest.yml --- .github/workflows/actions-loadtest.yml | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/actions-loadtest.yml diff --git a/.github/workflows/actions-loadtest.yml b/.github/workflows/actions-loadtest.yml new file mode 100644 index 00000000..96d32d8c --- /dev/null +++ b/.github/workflows/actions-loadtest.yml @@ -0,0 +1,48 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Build and loadtest + +on: + push: + branches: [ dev ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + env: + DATABASE_URL: postgresql://umami:umami@localhost:5432/umami + DATABASE_TYPE: postgresql + HASH_SALT: ${{ github.sha }} + + services: + postgres: + image: postgres + env: + POSTGRES_USER: umami + POSTGRES_PASSWORD: umami + POSTGRES_DB: umami + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + strategy: + fail-fast: false + matrix: + node-version: [14.x, 15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install schema + run: psql ${{ env.DATABASE_URL }} -f sql/schema.postgresql.sql &>/dev/null + - run: yarn install --non-interactive + - run: yarn build + - run: yarn start & + - run: yarn loadtest