mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
fix: use snack.Manager interface type for type assertions, drop coverpkg
This commit is contained in:
18
.github/workflows/integration.yml
vendored
18
.github/workflows/integration.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
- run: go build ./...
|
||||
- run: go vet ./...
|
||||
- run: go test -race -coverprofile=coverage-unit.out -coverpkg=./... ./...
|
||||
- run: go test -race -coverprofile=coverage-unit.out ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-unit
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
apt-get update
|
||||
apt-get install -y sudo tree curl
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-debian.out -coverpkg=./... ./apt/ ./dpkg/ ./detect/
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-debian.out ./apt/ ./dpkg/ ./detect/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -57,9 +57,9 @@ jobs:
|
||||
sudo apt-get install -y tree
|
||||
sudo snap install hello-world 2>/dev/null; sudo snap remove hello-world 2>/dev/null
|
||||
- name: Integration tests (apt)
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-ubuntu-apt.out -coverpkg=./... ./apt/ ./dpkg/ ./detect/
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-ubuntu-apt.out ./apt/ ./dpkg/ ./detect/
|
||||
- name: Integration tests (snap)
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-ubuntu-snap.out -coverpkg=./... ./snap/
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-ubuntu-snap.out ./snap/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
run: |
|
||||
dnf install -y tree sudo
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-fedora39.out -coverpkg=./... ./dnf/ ./rpm/ ./detect/
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-fedora39.out ./dnf/ ./rpm/ ./detect/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -99,7 +99,7 @@ jobs:
|
||||
run: |
|
||||
dnf install -y tree sudo
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-fedora-latest.out -coverpkg=./... ./dnf/ ./rpm/ ./detect/
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-fedora-latest.out ./dnf/ ./rpm/ ./detect/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
run: |
|
||||
apk add --no-cache sudo tree bash
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-alpine.out -coverpkg=./... ./apk/ ./detect/
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-alpine.out ./apk/ ./detect/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
pacman -Syu --noconfirm
|
||||
pacman -S --noconfirm sudo tree
|
||||
- name: Integration tests
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-arch.out -coverpkg=./... ./pacman/ ./detect/
|
||||
run: go test -v -tags integration -count=1 -coverprofile=coverage-arch.out ./pacman/ ./detect/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -164,7 +164,7 @@ jobs:
|
||||
sudo apt-get install -y flatpak
|
||||
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
- name: Integration tests
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-flatpak.out -coverpkg=./... ./flatpak/
|
||||
run: sudo -E go test -v -tags integration -count=1 -coverprofile=coverage-flatpak.out ./flatpak/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Apk(t *testing.T) {
|
||||
mgr := apk.New()
|
||||
var mgr snack.Manager = apk.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("apk not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Apt(t *testing.T) {
|
||||
mgr := apt.New()
|
||||
var mgr snack.Manager = apt.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("apt not available")
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestIntegration_DNF_Detection(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestIntegration_DNF(t *testing.T) {
|
||||
mgr := dnf.New()
|
||||
var mgr snack.Manager = dnf.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("dnf not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Dpkg(t *testing.T) {
|
||||
mgr := dpkg.New()
|
||||
var mgr snack.Manager = dpkg.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("dpkg not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Flatpak(t *testing.T) {
|
||||
mgr := flatpak.New()
|
||||
var mgr snack.Manager = flatpak.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("flatpak not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Pacman(t *testing.T) {
|
||||
mgr := pacman.New()
|
||||
var mgr snack.Manager = pacman.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("pacman not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Pkg(t *testing.T) {
|
||||
mgr := pkg.New()
|
||||
var mgr snack.Manager = pkg.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("pkg not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_RPM(t *testing.T) {
|
||||
mgr := rpm.New()
|
||||
var mgr snack.Manager = rpm.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("rpm not available")
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIntegration_Snap(t *testing.T) {
|
||||
mgr := snap.New()
|
||||
var mgr snack.Manager = snap.New()
|
||||
if !mgr.Available() {
|
||||
t.Skip("snap not available")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user