2026-05-19 11:42:25 +04:00

36 lines
961 B
YAML

name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nim
uses: jiro4989/setup-nim-action@v2
with:
nim-version: "2.2.10"
- name: Install dependencies
run: nimble setup -y
- name: Unit tests
run: nimble test
- name: Integration tests
# we call docker directly instead of nimble testIntegration because nimble
# exits with code 0 even when exec() fails, which would make CI pass on failure.
run: |
docker build -t libplum -f tests/Dockerfile .
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_PCP=1 libplum
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_UPNP=1 libplum
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_NATPMP=1 libplum