-
Notifications
You must be signed in to change notification settings - Fork 2
117 lines (91 loc) · 2.93 KB
/
pull_request.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Pipeline
on:
- pull_request
jobs:
build:
name: Build image
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@reusable
rubocop:
name: 'Lint: Rubocop'
uses: gmmcal/gmmcal.com.br/.github/workflows/lint.yml@reusable
with:
command: bundle exec rubocop --config .rubocop.yml .
needs: build
# reek:
# name: 'Lint: Reek'
# runs-on: ubuntu-20.04
# needs: build
# steps:
# - name: Run reek
# run: |
# docker run --rm gmmcal/gmmcal:test bundle exec reek --config .reek.yml .
# brakeman:
# name: 'Lint: Brakeman'
# runs-on: ubuntu-20.04
# needs: build
# steps:
# - name: Run brakeman
# run: |
# docker run --rm gmmcal/gmmcal:test bundle exec brakeman
# scsslint:
# name: 'Lint: SCSSLint'
# runs-on: ubuntu-20.04
# needs: build
# steps:
# - name: Run SCSSLint
# run: |
# docker run --rm gmmcal/gmmcal:test bundle exec scss-lint --config .scss-lint.yml
# tests:
# name: 'Unit: Backend'
# runs-on: ubuntu-20.04
# needs: build
# services:
# postgres:
# image: postgres:16
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: gmmcalcombr_test
# ports:
# - 5432:5432
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
# steps:
# - name: Run rubocop
# run: |
# docker run --network=${{ job.services.postgres.network }} -e DATABASE_URL='postgres://postgres:postgres@postgres:5432/gmmcalcombr_test' -e DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true --rm gmmcal/gmmcal:test
# bundler-audit:
# name: 'Lint: Bundler Audit'
# runs-on: ubuntu-20.04
# container:
# image: ruby:3.2.2
# steps:
# - uses: actions/checkout@v3
# - name: Install Bundler Audit
# run: gem install bundler-audit
# - name: Update advisory database
# run: bundler-audit update
# - name: Run bundler-audit
# run: bundler-audit
# eslint:
# name: 'Lint: ESLint'
# runs-on: ubuntu-20.04
# container:
# image: node:18
# steps:
# - uses: actions/checkout@v4
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-gmmcal-${{ hashFiles('/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-gmmcal-
# - name: Run yarn install
# run: yarn install
# - name: Run ESLint - Application
# run: yarn eslint
# - name: Run ESLint - Tests
# run: yarn eslint:tests