houdini/.github/workflows/full_build.yml

248 lines
8.4 KiB
YAML
Raw Normal View History

2020-06-04 16:19:29 +00:00
name: Houdini build
on: [push, pull_request]
jobs:
install_gems:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
ruby: [2.6.6]
2020-06-04 16:19:29 +00:00
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
- uses: actions/cache@v1
name: Use Gem cache
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
2020-06-04 16:19:29 +00:00
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
2020-06-04 16:19:29 +00:00
- name: bundle install
run: |
bundle config deployment true
bundle config path vendor/bundle
bundle install --jobs 4
install_yarn:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
ruby: [2.6.6]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
- name: install node packages
run: yarn install --frozen-lockfile
notice_ruby:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
ruby: [2.6.6]
needs: ['install_gems']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
- uses: actions/cache@v1
name: Use Gem cache
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
- name: bundle setup
run: |
bundle config deployment true
bundle config path vendor/bundle
2020-06-04 16:19:29 +00:00
- name: run notice:ruby:verify
run: |
bin/rails notice:ruby:verify
notice_js:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
ruby: [2.6.6]
needs: ['install_gems', 'install_yarn']
2020-06-04 16:19:29 +00:00
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
2020-06-04 16:19:29 +00:00
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
2020-06-04 16:19:29 +00:00
- uses: actions/cache@v1
name: Use Gem cache
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
2020-06-04 16:19:29 +00:00
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
- name: bundle setup
2020-06-04 16:19:29 +00:00
run: |
bundle config deployment true
bundle config path vendor/bundle
- name: run notice:js:verify
run: |
bin/rails notice:js:verify
jest:
needs: ['install_yarn']
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
- name: run jest
run: yarn jest
2020-06-26 23:24:56 +00:00
eslint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
needs: ['install_yarn']
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
- name: run yarn eslint
run: |
yarn eslint
2020-06-04 16:19:29 +00:00
main_build:
2020-06-27 02:44:16 +00:00
needs: ['install_yarn', 'install_gems']
2020-06-04 16:19:29 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
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
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Gem cache
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
- name: bundle setup
2020-06-04 16:19:29 +00:00
run: |
bundle config deployment true
bundle config path vendor/bundle
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
- name: run setup
run: bin/setup ci
- name: run spec
run: bin/rails spec
2020-06-30 21:44:16 +00:00
webpack:
needs: ['install_yarn', 'install_gems']
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
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
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.2
- uses: actions/cache@v1
name: Use Gem cache
with:
path: vendor/bundle
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-
- name: bundle setup
run: |
bundle config deployment true
bundle config path vendor/bundle
- uses: actions/cache@v1
name: Use Node package cache
with:
path: node_modules
key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-
- name: run setup
run: bin/setup ci
- name: Webpack compile everything
run: bin/webpack