Skip to content

[add] : badges and new coverage task #1

[add] : badges and new coverage task

[add] : badges and new coverage task #1

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- main
pull_request:
jobs:

Check failure on line 10 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 10
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies
run: sudo apt-get -y update && sudo apt-get -y install clang-format
- name: Lint source code
run: clang-format -i Code/src/*.c && clang-format -i Code/tests/*.c
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build main and tests
run: |
mkdir -p Code/build
make main -C Code/
make tests -C Code/
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build tests
run: make tests -C Code/
- name: Run tests
run: |
chmod 777 Code/build/tri_tests
./Code/build/tri_tests
coverage:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install -qq build-essential expect sudo ccache
sudo apt-get -y install clang-format make check lcov gcovr
sudo apt install -y glibc-source gcc-arm-none-eabi
sudo apt-get -y update
sudo apt-get -y upgrade
- name: Build code and generate coverage
run: |
make -C Code/
make coverage -C Code/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage/*.info
flags: unittests
name: codecov-umbrella
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}