-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.15 KB
/
c-lint.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
name: C Lint
on:
push:
paths:
- 'src/SERVER/**.c'
jobs:
banana:
runs-on: ubuntu-latest
env:
workdir: ./src/SERVER
steps:
- uses: actions/checkout@v3
- name: Install Deps
run: |
sudo systemctl enable --now docker
- name: Lint
run: sudo docker run --rm -i -v "$PWD:/mnt/delivery" -v "$PWD:/mnt/reports" ghcr.io/epitech/coding-style-checker:latest /mnt/delivery /mnt/reports
working-directory: ${{ env.workdir }}
- name: Upload Lint Report
uses: actions/upload-artifact@v3
with:
name: lint-report.log
path: src/SERVER/coding-style-reports.log
- name: Is error ?
run: |
if [ ! -f 'coding-style-reports.log' ]; then exit 0; fi
if [ -s 'coding-style-reports.log' ]; then cat 'coding-style-reports.log' && exit 1; fi
working-directory: ${{ env.workdir }}
tests_run:
runs-on: ubuntu-latest
container: epitechcontent/epitest-docker:latest
needs: [banana]
env:
workdir: ./src/SERVER
steps:
- uses: actions/checkout@v3
- name: Install Deps
run: make tests_run
working-directory: ${{ env.workdir }}