-
Notifications
You must be signed in to change notification settings - Fork 24
142 lines (140 loc) · 4.28 KB
/
qa.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: QA
on:
push:
branches:
- "*"
- "*/*"
pull_request:
branches:
- "*"
- "*/*"
schedule:
- cron: '0 0 * * *'
jobs:
crystal:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:1.14.0
steps:
- uses: actions/checkout@v1
- name: Install shards
run: shards install --ignore-crystal-version
- name: QA checks
run: make qa
generated-app:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: crystallang/crystal:1.14.0
steps:
- uses: actions/checkout@v2
- name: Install packages required for SQLite
run: |
apt-get update
apt-get -yqq install libsqlite3-dev
- name: Install shards
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables
- name: Build the Marten CLI
run: |
mkdir bin
crystal build src/marten_cli.cr -o bin/marten
- name: Generate an app
run: |
mkdir tmp
bin/marten new app test --dir=./tmp/test-app
- name: Install generated app dependencies
run: |
cd tmp/test-app
echo "development_dependencies: { ameba: { github: crystal-ameba/ameba }}" >> shard.yml
shards install --ignore-crystal-version
cd lib && rm -rf marten && ln -s ../../.. marten
- name: Run ameba on the generated app
run: |
cd tmp/test-app
echo -e "Globs:\n - \"**/*.cr\"\n - \"!lib\"" >> .ameba.yml
bin/ameba
generated-project:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: crystallang/crystal:1.14.0
steps:
- uses: actions/checkout@v2
- name: Install packages required for SQLite
run: |
apt-get update
apt-get -yqq install libsqlite3-dev
- name: Install shards
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables
- name: Build the Marten CLI
run: |
mkdir bin
crystal build src/marten_cli.cr -o bin/marten
- name: Generate a project
run: |
mkdir tmp
bin/marten new project test --dir=./tmp/test-project
- name: Install generated project dependencies
run: |
cd tmp/test-project
echo "development_dependencies: { ameba: { github: crystal-ameba/ameba }}" >> shard.yml
shards install --ignore-crystal-version
cd lib && rm -rf marten && ln -s ../../.. marten
- name: Run ameba on the generated project
run: |
cd tmp/test-project
echo -e "Globs:\n - \"**/*.cr\"\n - \"!lib\"" >> .ameba.yml
bin/ameba
generated-auth-project:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: crystallang/crystal:1.14.0
steps:
- uses: actions/checkout@v2
- name: Install packages required for SQLite
run: |
apt-get update
apt-get -yqq install libsqlite3-dev
- name: Install shards
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables
- name: Build the Marten CLI
run: |
mkdir bin
crystal build src/marten_cli.cr -o bin/marten
- name: Generate a project with authentication
run: |
mkdir tmp
bin/marten new project test --with-auth --dir=./tmp/test-auth-project
- name: Install generated project dependencies
run: |
cd tmp/test-auth-project
echo "development_dependencies: { ameba: { github: crystal-ameba/ameba }}" >> shard.yml
shards install --ignore-crystal-version
cd lib && rm -rf marten && ln -s ../../.. marten
- name: Run ameba on the generated project
run: |
cd tmp/test-auth-project
echo -e "Globs:\n - \"**/*.cr\"\n - \"!lib\"" >> .ameba.yml
bin/ameba
docs:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:1.14.0
steps:
- uses: actions/checkout@v1
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install shards
run: shards install --ignore-crystal-version
- name: Install doc dependencies
run: cd docs && npm install
- name: Build doc
run: |
crystal docs --output=docs/static/api
cd docs && npm run build