workflow: switch to composite action to fix go/pytest
The go/pytest tests were broken because the reusable workflow is not quite the right construct. We need the "composite action".
This commit is contained in:
parent
573f56a6ec
commit
25043b2e70
4 changed files with 18 additions and 22 deletions
13
.github/actions/testdeps/action.yaml
vendored
Normal file
13
.github/actions/testdeps/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
name: Install common test dependencies
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
workflow_call:
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install common test dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman
|
||||
6
.github/workflows/go.yaml
vendored
6
.github/workflows/go.yaml
vendored
|
|
@ -12,20 +12,16 @@ on: # yamllint disable-line rule:truthy
|
|||
types: ["checks_requested"]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/testdeps
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
|
|
|||
8
.github/workflows/pytest.yaml
vendored
8
.github/workflows/pytest.yaml
vendored
|
|
@ -12,8 +12,8 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install yamllint
|
||||
run: sudo apt-get install -y yamllint aspell
|
||||
- name: Install lint dependencies
|
||||
run: sudo apt install -y yamllint aspell pre-commit
|
||||
- name: "Clone Repository"
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
|
|
@ -23,13 +23,13 @@ jobs:
|
|||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
uses: ./.github/workflows/testdeps.yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/testdeps
|
||||
- name: Install integration test env
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y pytest golang
|
||||
sudo apt install -y python3-pytest golang
|
||||
|
||||
- name: Run integration tests via pytest
|
||||
run: |
|
||||
|
|
|
|||
13
.github/workflows/testdeps.yaml
vendored
13
.github/workflows/testdeps.yaml
vendored
|
|
@ -1,13 +0,0 @@
|
|||
name: Install common test dependencies
|
||||
|
||||
on: # yamllint disable-line rule:truthy
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
install:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install common test dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman
|
||||
Loading…
Add table
Add a link
Reference in a new issue