forked from houdiniproject/houdini
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (78 loc) · 2.38 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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: ['13', '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