nullnet-firewall 0.2.2

Rust-based firewall for network drivers
Documentation
name: CI

on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - '*'

env:
  CARGO_TERM_COLOR: always

# Linters inspired from here: https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
jobs:

  Linux:
    name: Linux (fmt, build, clippy, test)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: Install libpcap
        run: sudo apt-get install libpcap-dev
      - name: install fmt
        run: rustup component add rustfmt
      - name: install clippy
        run: rustup component add clippy
      - name: fmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check
      - name: build
        run: cargo build --verbose
      - name: clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings
      - name: test
        run: cargo test --verbose

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Generate code coverage
        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v3
        with:
          files: lcov.info
          fail_ci_if_error: false
          token: ${{ secrets.CODECOV_IO }}