-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We did not consider that to publish our snap via launchpad, we require static `snapcraft.yaml` file present in the repository. Reverts #184 Signed-off-by: Martin Kalcok <[email protected]>
- Loading branch information
Showing
23 changed files
with
19 additions
and
269 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ jobs: | |
- name: Lint | ||
run: | | ||
autoconf | ||
./configure --disable-dep-check | ||
make check-lint | ||
build: | ||
|
@@ -61,10 +59,7 @@ jobs: | |
--classic | ||
- name: Build snap | ||
run: | | ||
autoconf | ||
./configure --enable-coverage | ||
make $MICROOVN_SNAP | ||
run: make $MICROOVN_SNAP | ||
|
||
- name: Upload artifacts | ||
if: always() | ||
|
@@ -136,66 +131,5 @@ jobs: | |
sudo lxd init --auto | ||
snap list | ||
- name: Configure repository | ||
run: | | ||
autoconf | ||
./configure --enable-coverage --disable-dep-check | ||
- name: Run system tests | ||
run: SKIP_SNAP_REBUILD=yes make tests/${{ matrix.test-file }} | ||
|
||
- name: Upload test coverage | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.test-file }}_coverage | ||
path: ${{ github.workspace }}/.coverage | ||
include-hidden-files: true | ||
retention-days: 1 | ||
|
||
generate-coverage: | ||
name: Generate coverage profile | ||
needs: | ||
- metadata | ||
- system-tests | ||
# 'ubuntu-latest' currently resolves to '22.04' [0] and since we require "Go >=1.20" | ||
# for coverage tools, we need to use explicit 'ubuntu-24.04' image name. | ||
# [0] https://github.com/actions/runner-images/issues/10636 | ||
runs-on: ubuntu-24.04 | ||
env: | ||
COVERAGE_DIR: ${{ github.workspace }}/.coverage | ||
COVERAGE_MERGED: ${{ github.workspace }}/.coverage/_merged | ||
COVERAGE_MERGED_PROFILE: ${{ github.workspace }}/.coverage/_merged/profile.out | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install -yqq golang | ||
go install github.com/boumenot/[email protected] | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download test coverage data | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ${{ env.COVERAGE_DIR }} | ||
pattern: "*_coverage" | ||
|
||
- name: Merge test coverage data | ||
run: | | ||
mkdir -p "$COVERAGE_MERGED" | ||
coverage_inputs=$(find "$COVERAGE_DIR" -type d -name coverage | tr '\n' ',' | sed 's/,$//g') | ||
go tool covdata merge -i="$coverage_inputs" -o="$COVERAGE_MERGED" | ||
go tool covdata textfmt -i="$COVERAGE_MERGED" -o="$COVERAGE_MERGED_PROFILE" | ||
- name: Generate cobertura.xml | ||
run: | | ||
cd microovn/ | ||
$HOME/go/bin/gocover-cobertura < "$COVERAGE_MERGED_PROFILE" > "$COVERAGE_DIR/cobertura.xml" | ||
- name: Upload cobertura.xml | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cobertura.xml | ||
path: ${{ env.COVERAGE_DIR }}/cobertura.xml | ||
include-hidden-files: true | ||
|
||
run: .bats/bats-core/bin/bats tests/${{ matrix.test-file }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1 @@ | ||
*.snap | ||
|
||
# Files that are generated by configure script | ||
Makefile | ||
snap/snapcraft.yaml | ||
snapcraft/commands/daemon.start | ||
snapcraft/commands/microovn | ||
|
||
# autoconf files | ||
autom4te.cache | ||
/autoscan.log | ||
/autoscan-*.log | ||
/aclocal.m4 | ||
/compile | ||
/config.cache | ||
/config.guess | ||
/config.h.in | ||
/config.log | ||
/config.status | ||
/config.sub | ||
/configure | ||
/configure~ | ||
/configure.scan | ||
/depcomp | ||
/install-sh | ||
/missing | ||
/stamp-h1 | ||
|
||
# Test coverage files | ||
.coverage/ |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
2 changes: 0 additions & 2 deletions
2
snapcraft/commands/daemon.start.in → snapcraft/commands/daemon.start
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/bin/sh | ||
@GO_COVERAGE_OUTPUT@ | ||
|
||
exec microovn --state-dir "${SNAP_COMMON}/state" "$@" |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ setup() { | |
} | ||
|
||
teardown() { | ||
collect_coverage $TEST_CONTAINERS | ||
delete_containers $TEST_CONTAINERS | ||
} | ||
|
||
|
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
Oops, something went wrong.