Skip to content

Commit f6943db

Browse files
feat: Add scan-build tests and Discord notifications to CI workflow
1 parent 10c5b68 commit f6943db

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/Dockerfile4

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM epitechcontent/epitest-docker:latest AS builder
2+
WORKDIR /app/make
3+
COPY . .
4+
5+
RUN make
6+
RUN make fclean
7+
RUN cp ./.github/test.c ./test.c
8+
RUN chmod +x assemble.sh
9+
10+
# Compile and test
11+
CMD ./mncc ./test.c && ./assemble.sh test.c && ./test; if [ $? -eq 4 ]; then exit 0; else exit 1; fi

.github/workflows/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,24 @@ jobs:
101101
run: docker build . -t cs-test --file Dockerfile --tag my-image-name:$(date +%s)
102102
- name: Run scan-build tests
103103
run : docker run cs-test:latest
104+
- name: Discord notification
105+
uses: sarisia/actions-status-discord@v1
106+
if: always()
107+
with:
108+
webhook: ${{ secrets.DISCORD_WEBHOOK }}
109+
110+
assembler-build-test:
111+
needs: [basic-build, cs-build]
112+
runs-on: ubuntu-latest
113+
114+
steps:
115+
- uses: actions/checkout@v6
116+
- name: Copy Dockerfile inside root
117+
run : cp ./.github/Dockerfile4 ./Dockerfile
118+
- name: Build scan-build tests
119+
run: docker build . -t asm-test --file Dockerfile --tag my-image-name:$(date +%s)
120+
- name: Run scan-build tests
121+
run : docker run asm-test:latest
104122
- name: Discord notification
105123
uses: sarisia/actions-status-discord@v1
106124
if: always()

0 commit comments

Comments
 (0)