Skip to content

Commit

Permalink
ci: e2e flow
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Feb 7, 2025
1 parent 1ab73e8 commit 0a961d8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 40 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

59 changes: 49 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,62 @@ on:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.23.x]
os: [ubuntu-latest]
fail-fast: false
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: 1.23.x

- name: Checkout repository
uses: actions/checkout@v4

- name: Build
run: make

- name: Test
run: go test ./...
env:
CGO_ENABLED: 0
run: make test

- uses: actions/upload-artifact@v4
with:
name: ndnd
path: ndnd

lint:
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x

- name: Checkout repository
uses: actions/checkout@v4

- name: Go imports lint
uses: zjkmxy/[email protected]
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}

e2e:
needs: test
runs-on: ubuntu-latest

container:
image: ghcr.io/named-data/mini-ndn:master
options: --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: ndnd
path: /bin/ndnd

- name: Run e2e tests
run: make e2e
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION= $(shell git describe --tags --always --dirty)
STD_PACKAGE = github.com/named-data/ndnd/std

.PHONY: all install clean test coverage
.PHONY: all install clean test coverage e2e

all: ndnd

Expand All @@ -25,6 +25,9 @@ clean-gen:
test:
CGO_ENABLED=0 go test ./... -coverprofile=coverage.out

e2e:
python3 e2e/runner.py

coverage:
go tool cover -html=coverage.out

Expand Down

0 comments on commit 0a961d8

Please sign in to comment.