-
Notifications
You must be signed in to change notification settings - Fork 293
45 lines (36 loc) · 1.02 KB
/
ci.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
# This workflow will run all checks required for a PR to be merged.
name: Build and Test ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.0.0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "18.16.1"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: yarn
- name: Check linting and formatting
run: |
if yarn lint && yarn format --check; then
echo "Linting and formatting checks passed."
else
echo "Linting or formatting checks failed. Please fix the issues."
exit 1
fi
- name: Build generated code
run: yarn build
- name: Check for build failures
run: |
if ! ${{ success() }}; then
echo "Build failed. Please fix the issues."
exit 1
fi