Add support of interface created by dispatch script #4795
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
rust_lint: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- rust_version: "stable" | |
- rust_version: "nightly" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: | | |
rustup override set ${{ matrix.rust_version }} | |
rustup update ${{ matrix.rust_version }} | |
rustup component add rustfmt clippy | |
- name: Check fmt | |
if: matrix.rust_version == 'stable' | |
run: cd rust && cargo fmt -- --check | |
- name: Check clippy | |
if: matrix.rust_version == 'nightly' | |
run: cd rust && cargo clippy -- -D warnings | |
- name: Check clippy gen_conf | |
if: matrix.rust_version == 'nightly' | |
run: | | |
cd rust && cargo clippy \ | |
--no-default-features --features gen_conf \ | |
-- -D warnings | |
- name: Check clippy query_apply | |
if: matrix.rust_version == 'nightly' | |
run: | | |
cd rust && cargo clippy \ | |
--no-default-features --features query_apply \ | |
-- -D warnings | |
rust_unit: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- rust_version: "stable" | |
- rust_version: "nightly" | |
- rust_version: "beta" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: | | |
rustup override set ${{ matrix.rust_version }} | |
rustup update ${{ matrix.rust_version }} | |
- name: Install tools for tests | |
run: | | |
sudo apt-get update; | |
sudo apt-get -y install valgrind | |
- name: Unit test | |
run: cd rust && cargo test -- --show-output | |
- name: C library test | |
run: make clib_check | |
rpm_build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os_type: "el9" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build nmstate rpm | |
run: .github/workflows/build_rpm.sh ${{ matrix.os_type }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: rpms_${{ matrix.os_type }} | |
path: rpms/${{ matrix.os_type }} | |
retention-days: 5 | |
py_lint: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- job_type: "c9s-nm_stable-format" | |
- job_type: "c9s-nm_stable-lint" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests | |
shell: bash | |
run: sudo .github/workflows/run_test.sh ${{ matrix.job_type }} | |
integ: | |
runs-on: ubuntu-22.04 | |
needs: [rust_lint, py_lint, rpm_build] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- job_type: "c9s-nm_stable-integ_tier1" | |
- job_type: "c9s-nm_stable-integ_tier2" | |
- job_type: "c9s-nm_stable-integ_slow" | |
- job_type: "c9s-nm_stable-rust_go" | |
- job_type: "c9s-nm_main-integ_tier1" | |
- job_type: "c9s-nm_main-integ_tier2" | |
- job_type: "c9s-nm_main-integ_slow" | |
- job_type: "c9s-nm_main-rust_go" | |
- job_type: "c9s-nm_1.42-integ_tier1" | |
- job_type: "c9s-nm_1.42-integ_tier2" | |
- job_type: "c9s-nm_1.42-integ_slow" | |
- job_type: "fed-nm_stable-integ_tier1" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Enable openvswitch kernel module | |
run: sudo modprobe openvswitch | |
- name: Download compiled EL9 rpm | |
uses: actions/download-artifact@v3 | |
with: | |
name: rpms_el9 | |
path: rpms/el9 | |
- name: Install extra kernel modules(e.g. vrf) | |
run: | | |
sudo apt-get update; | |
sudo apt-get -y install "linux-modules-extra-$(uname -r)" | |
- name: Run tests | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: sudo .github/workflows/run_test.sh ${{ matrix.job_type }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: nmstate-test-junit-artifact-${{ matrix.job_type }} | |
path: junit.*xml | |
retention-days: 5 | |
- name: Set artifacts permissions | |
if: ${{ failure() }} | |
run: sudo chmod 777 test_artifacts/* | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: nmstate-test-artifact-${{ matrix.job_type }} | |
path: test_artifacts/ | |
retention-days: 5 | |
macos_gen_conf_build: | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- rust_version: "stable" | |
- rust_version: "nightly" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust_version }} | |
run: | | |
rustup override set ${{ matrix.rust_version }} | |
rustup update ${{ matrix.rust_version }} | |
rustup component add rustfmt clippy | |
- name: Build gen_conf | |
run: | | |
cd rust && cargo build --no-default-features \ | |
--features gen_conf |