Run tests during CI

This commit is contained in:
Michal Sojka 2024-12-23 00:18:06 +01:00
parent 6c5663f3c9
commit 2ba5146201
2 changed files with 16 additions and 0 deletions

View file

@ -14,3 +14,17 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check
tests:
name: Test suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- run: "nix develop -c echo preparing environment"
- run: "set -o pipefail; nix develop -c bats test/{test,long_tests}.bats | tee tests.tap"
- uses: pcolby/tap-summary@v1
if: always()

View file

@ -102,6 +102,7 @@
p.bats-assert
p.bats-file
]))
pkgs.vcstool
pkgs.python3Packages.flake8
pkgs.python3Packages.flake8-bugbear
pkgs.python3Packages.isort
@ -109,6 +110,7 @@
];
ROSDEP_SOURCE_PATH = "${rosdistro}/rosdep/sources.list.d";
ROSDISTRO_INDEX_URL = "file://${rosdistro}/index-v4.yaml";
ROS_HOME = rosdep-cache;
};
packages = {
default = ros2nix;