Skip to content

Bump word-wrap from 1.2.3 to 1.2.5 in /client #2537

Bump word-wrap from 1.2.3 to 1.2.5 in /client

Bump word-wrap from 1.2.3 to 1.2.5 in /client #2537

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
env:
PATH: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin
jobs:
client-lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v1
- name: "Install Node 16.x"
uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: "Install Yarn"
run: |
sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install -y yarn
- name: "Restore Node dependencies from cache"
uses: actions/cache@v1
with:
path: client/node_modules
key: ${{ runner.OS }}-node-module-cache-${{ hashFiles('**/client/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-module-cache-
- name: "Install Node dependencies"
env:
NODE_ENV: development
run: |
cd client
yarn install
- name: "Lint client"
run: |
cd client
yarn lint
client-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v1
- name: "Install Node 12.x"
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: "Install Yarn"
run: |
sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install -y yarn
- name: "Restore Node dependencies from cache"
uses: actions/cache@v1
with:
path: client/node_modules
key: ${{ runner.OS }}-node-module-cache-${{ hashFiles('**/client/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-module-cache-
- name: "Install Node dependencies"
env:
NODE_ENV: development
run: |
cd client
yarn install
- name: "Run client tests"
run: |
cd client
yarn test-ci
api-lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v1
- name: "Install Ruby 2.7.3"
uses: ruby/setup-ruby@v1
with:
bundler: 2.2.17
bundler-cache: true
ruby-version: 2.7.3
working-directory: api
- name: "Install PostgreSQL 11 client"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libpq-dev
version: 1.0
- name: "Run Rubopcop"
run: |
cd api
bin/rubocop
api-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.2-alpine
ports: ["5432:5432"]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: manifold_test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
ports: ["6379:6379"]
options: --entrypoint redis-server
steps:
- name: "Checkout code"
uses: actions/checkout@v1
- name: "Install Ruby 2.7.3"
uses: ruby/setup-ruby@v1
with:
bundler: 2.2.17
bundler-cache: true
ruby-version: 2.7.3
working-directory: api
- name: "Install PostgreSQL 11 client"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libpq-dev
version: 1.0
- name: "Install Pandoc"
run: |
wget https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-1-amd64.deb
sudo dpkg -i pandoc-2.2-1-amd64.deb
- name: "Install Node 12.x"
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: "Install Yarn"
run: |
sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install -y yarn
- name: "Restore Node dependencies from cache"
uses: actions/cache@v1
with:
path: client/node_modules
key: ${{ runner.OS }}-node-module-cache-${{ hashFiles('**/client/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-module-cache-
- name: "Install Node dependencies"
env:
NODE_ENV: development
run: |
cd client
yarn install
- name: "Setup test database"
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/manifold_test"
RAILS_ENV: "test"
run: |
cd api
bin/rails db:setup
- name: "Increase file nodes"
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: "Run API specs"
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/manifold_test"
RAILS_ENV: "test"
run: |
cd api
bin/rspec spec --tag="~integration" --tag="~slow" --tag="~elasticsearch"