Skip to content

Commit b632d5e

Browse files
committed
Remove configuration
Update CI Remove temporarirly other jobs Update badge Add badges test
1 parent 3cd5791 commit b632d5e

4 files changed

Lines changed: 66 additions & 67 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,79 +4,29 @@ on:
44
pull_request:
55

66
jobs:
7-
lint:
8-
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
python-version: ["3.10", "3.11"]
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-python@v5
15-
with:
16-
python-version: ${{ matrix.python-version }}
17-
cache: "pip"
18-
19-
- name: Upgrade pip
20-
run: python -m pip install -U pip
21-
22-
- name: Install project + dev extras
23-
run: pip install ".[dev]"
24-
25-
- name: Lint (pylint)
26-
run: pylint biped_walking_controller || true # drop `|| true` if you want hard fail
27-
287
tests:
298
runs-on: ubuntu-latest
30-
needs: lint
31-
strategy:
32-
matrix:
33-
python-version: [ "3.10", "3.11" ]
349
steps:
3510
- uses: actions/checkout@v4
3611
- uses: actions/setup-python@v5
3712
with:
38-
python-version: ${{ matrix.python-version }}
13+
python-version: 3.11
3914
cache: pip
15+
4016
- name: Upgrade pip
4117
run: python -m pip install -U pip
18+
4219
- name: Install project + test deps
43-
run: pip install ".[dev]" pytest pytest-cov
20+
run: pip install -e ".[dev]" pytest pytest-cov
21+
4422
- name: Run tests with coverage
4523
run: |
46-
pytest -q \
47-
--cov=biped_walking_controller \
48-
--cov-report=term-missing \
49-
--cov-report=xml \
50-
--cov-report=html
51-
- name: Upload HTML coverage
52-
if: always()
53-
uses: actions/upload-artifact@v4
54-
with:
55-
name: coverage-html-${{ matrix.python-version }}
56-
path: htmlcov
57-
- name: Upload coverage XML
58-
if: always()
59-
uses: actions/upload-artifact@v4
60-
with:
61-
name: coverage-xml-${{ matrix.python-version }}
62-
path: coverage.xml
63-
docs:
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: actions/checkout@v4
67-
- uses: actions/setup-python@v5
24+
pytest --cov=biped_walking_controller --cov-report=xml --cov-report=term-missing:skip-covered
25+
26+
- name: Upload coverage to Codecov
27+
uses: codecov/codecov-action@v4
6828
with:
69-
python-version: ${{ matrix.python-version }}
70-
cache: pip
71-
- name: Upgrade pip
72-
run: python -m pip install -U pip
73-
- name: Install project dependencies
74-
run: pip install ".[docs]"
75-
- name: Pull LFS files
76-
run: git lfs fetch --all && git lfs checkout
77-
- name: Build documentation
78-
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
79-
run: mkdocs build
80-
- name: Deploy documentation
81-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
82-
run: mkdocs gh-deploy --force
29+
files: ./coverage.xml
30+
flags: unittests
31+
fail_ci_if_error: true
32+

.github/workflows/push_image.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish image to GHCR
2+
on:
3+
push:
4+
branches: [ main ]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Lowercase owner
23+
run: echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
24+
25+
- name: Login to GHCR
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ env.OWNER_LC }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract Docker metadata
33+
id: meta
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: ghcr.io/${{ env.OWNER_LC }}/biped_walking_controller
37+
tags: |
38+
type=ref,event=branch,branch=main
39+
type=sha,format=long
40+
type=ref,event=tag
41+
type=raw,value=latest,enable={{is_default_branch}}
42+
43+
- name: Build and push
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
push: true
48+
platforms: linux/amd64
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Biped Walking Controller
22

33
[![Build and tests](https://github.com/rdesarz/lipm-walking-controller/actions/workflows/build.yml/badge.svg)](https://github.com/rdesarz/lipm-walking-controller/actions/workflows/build.yml)
4+
![Codecov (with branch)](https://img.shields.io/codecov/c/github/rdesarz/biped-walking-controller/6-build-and-release-docker-images-during-ci-on-main)
5+
[![Docs](https://img.shields.io/badge/docs-online-blue)](https://rdesarz.github.io/biped-walking-controller)
6+
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
47

58
This repository presents an open-source implementation of the **Linear Inverted Pendulum Model (LIPM)** walking pattern
69
generator based on **preview control of the Zero-Moment Point (ZMP)**, following the formulation introduced

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,3 @@ warn_redundant_casts = true
6464
disallow_any_generics = true
6565
plugins = []
6666

67-
[tool.pytest.ini_options]
68-
minversion = "8.0"
69-
testpaths = ["tests"]
70-
addopts = "-q"

0 commit comments

Comments
 (0)