-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (57 loc) · 1.71 KB
/
static.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
name: Static analysis
on: [pull_request]
jobs:
graphql-inspector:
name: graphql-inspector
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
- name: Install libvips42
run: sudo apt-get update && sudo apt-get install libvips42
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Generate GraphQL schema file
run: bin/rails graphql:schema:dump
- uses: kamilkisiela/graphql-inspector@master
with:
schema: 'main:schema.graphql'
rubocop:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
skip_install: true
use_bundler: true
only_changed: true
eslint:
name: eslint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
- run: yarn install
- run: mkdir -p /home/runner/.local/bin
- run: echo "#!/bin/sh" > /home/runner/.local/bin/eslint
- run: echo "yarn run eslint \$@" >> /home/runner/.local/bin/eslint
- run: cat /home/runner/.local/bin/eslint
- run: chmod +x /home/runner/.local/bin/eslint
- run: eslint --version
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
eslint_flags: 'app/javascript test/javascript schema.graphql'