144 lines
No EOL
4.6 KiB
YAML
144 lines
No EOL
4.6 KiB
YAML
# License: LGPL-3.0-or-later
|
|
name: Javascript build and test
|
|
env:
|
|
ruby: '2.6.6'
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
jobs:
|
|
lint:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14.6.0]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1.4.2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
|
${{ matrix.os }}-yarn-
|
|
- run: yarn install --frozen-lockfile
|
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
|
with:
|
|
ruby-version: ${{ env.ruby }}
|
|
- uses: actions/cache@v2
|
|
name: Use Gem cache
|
|
with:
|
|
path: vendor/bundle
|
|
key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-
|
|
- run: |
|
|
bundle config deployment true
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4
|
|
- name: run eslint
|
|
run: yarn eslint
|
|
jest:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14.6.0]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1.4.2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
|
${{ matrix.os }}-yarn-
|
|
- run: yarn install --frozen-lockfile
|
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
|
with:
|
|
ruby-version: ${{ env.ruby }}
|
|
- uses: actions/cache@v2
|
|
name: Use Gem cache
|
|
with:
|
|
path: vendor/bundle
|
|
key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-
|
|
- run: |
|
|
bundle config deployment true
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4
|
|
- name: run jest
|
|
run: yarn jest
|
|
webpack:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node: [14.6.0]
|
|
ruby: [2.6.6]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
|
|
uses: Daniel-Marynicz/postgresql-action@0.1.0
|
|
with:
|
|
postgres_image_tag: 11-alpine
|
|
postgres_user: houdini_user
|
|
postgres_password: password
|
|
- uses: actions/setup-node@v1.4.2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
|
${{ matrix.os }}-yarn-
|
|
- run: yarn install --frozen-lockfile
|
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
|
with:
|
|
ruby-version: ${{ env.ruby }}
|
|
- uses: actions/cache@v2
|
|
name: Use Gem cache
|
|
with:
|
|
path: vendor/bundle
|
|
key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-
|
|
- run: |
|
|
bundle config deployment true
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4
|
|
- name: run setup
|
|
run: bin/setup ci
|
|
- name: Webpack compile everything
|
|
run: bin/webpack
|
|
- name: Verify storybook compiles
|
|
run: yarn build-storybook
|
|
|
|
|
|
|
|
|