Skip to content

Merge pull request #920 from CommitChange/reduce-delayed-job-time #2368

Merge pull request #920 from CommitChange/reduce-delayed-job-time

Merge pull request #920 from CommitChange/reduce-delayed-job-time #2368

Workflow file for this run

name: Main build
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: ["supporter_level_goal"]
concurrency:
group: build--${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
node: [14.19.1, 16]
ruby: ['2.6.10']
postgres: ['16']
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
ruby:
- 'app/**'
- 'bin/**'
- 'config/**'
- 'db/**'
- 'gems/**'
- 'lib/**'
- 'public/**'
- 'script/**'
- 'spec/**'
- '.ruby-version'
- '.rspec'
- 'config.ru'
- 'Gemfile'
- 'Gemfile.lock'
- 'Rakefile'
js:
- '**/*.js*'
- '**/*.es6'
- '**/*.ts*'
- '**/*.json'
- package.json
- yarn.lock
- '.nvmrc'
- '.babelrc'
- '.bootstraprc'
- '.browserlistrc'
- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
uses: Daniel-Marynicz/[email protected]
with:
postgres_image_tag: ${{ matrix.postgres }}-alpine
postgres_user: admin
postgres_password: password
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: set CUSTOM_RUBY_VERSION environment variable
run: echo "CUSTOM_RUBY_VERSION=${{ matrix.ruby }}" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bin/setup
- if: steps.changes.outputs.ruby == 'true'
name: run spec
run: bin/rake spec
- if: steps.changes.outputs.ruby == 'true'
run: script/compile-assets.sh
- if: steps.changes.outputs.js == 'true'
run: yarn build
- if: steps.changes.outputs.js == 'true'
run: yarn jest