Skip to content

[test] test normal c based 42project #3

[test] test normal c based 42project

[test] test normal c based 42project #3

Workflow file for this run

---
name: CI Pipeline
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
check-norm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install setuptools norminette
- name: Run norminette checks
run: |
norminette
make-with-flags:
runs-on: ubuntu-latest
needs: check-norm
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: install docker-compose
run: |
sudo apt-get update
sudo apt-get install -y make gcc
- name: Create Makefile for testing
run: |
echo 'SRCS= $(shell find . -type f -name "*.c")\nINCLUDES= $(shell find . -type f -name "*.h")\nOBJS= $(SRCS:.c=.o)\nCC= cc\nCFLAGS= -Wall -Wextra -Werror\nNAME= uniq_name_][\nall: $(NAME)\n$(NAME): $(OBJS)\n\t$(CC) $(OBJS) -o $(NAME)\n%.o: %.c $(INCLUDES)\n\t$(CC) $(CFLAGS) -c $< -o $@' > Makefile
- name: Run Services
run: |
make
# build-microservices:
# needs: [lint-microservices, test-microservices]
# runs-on: ubuntu-latest
# strategy:
# matrix:
# service: [chat, game, ranking, registration, tournament, users, auth]
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Log in to Docker Hub
# run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
# - name: Build and push backend images
# run: |
# cd services/${{ matrix.service }}/backend
# docker build -t ${{ secrets.CI_REGISTRY_IMAGE }}-${{ matrix.service }}:${{ github.sha }} -t ${{ secrets.CI_REGISTRY_IMAGE }}-${{ matrix.service }}:latest .
# docker push ${{ secrets.CI_REGISTRY_IMAGE }}-${{ matrix.service }}:${{ github.sha }}
# docker push ${{ secrets.CI_REGISTRY_IMAGE }}-${{ matrix.service }}:latest