Skip to content

Commit

Permalink
[skip] Adjust github workflows files
Browse files Browse the repository at this point in the history
* Add test workflows based on salt-test (#616)

* Add unit test workflow based on salt-test

* Add integration test workflow based on salt-test

* Adjust GH actions to run all tests subsets and include functional

* Add new GH action to trigger scenarios tests

* GH Actions: Fix Salt version in _version.txt file

When GH Actions are executed, they skip the default entrypoint for the
container, so we need to arrange the _version.txt file manually

Propagate GITHUB_ACTIONS variable to container environment
  • Loading branch information
meaksh committed Oct 29, 2024
1 parent 583c813 commit 30103dd
Show file tree
Hide file tree
Showing 11 changed files with 208 additions and 117 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/functional-fast-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fast functional tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
fast-functional-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Fast functional tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic functional -- -vvv
26 changes: 26 additions & 0 deletions .github/workflows/functional-full-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Full functional tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
full-functional-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Full functional tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic functional -- --core-tests --slow --run-expensive --ssh-tests --run-destructive -vvv
39 changes: 0 additions & 39 deletions .github/workflows/functional-opensuse-leap.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/integration-fast-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fast integration tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
fast-integration-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Fast integration tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic integration -- -vvv
26 changes: 26 additions & 0 deletions .github/workflows/integration-full-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Full integration tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
full-integration-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Full integration tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic integration -- --core-tests --slow --run-expensive --ssh-tests --run-destructive -vvv
39 changes: 0 additions & 39 deletions .github/workflows/integration-opensuse-leap.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/scenarios-fast-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fast scenarios tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
fast-scenarios-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Fast scenarios tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic scenarios -- -vvv
26 changes: 26 additions & 0 deletions .github/workflows/scenarios-full-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Full scenarios tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
full-scenarios-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Full scenarios tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic scenarios -- --core-tests --slow --run-expensive --ssh-tests --run-destructive -vvv
26 changes: 26 additions & 0 deletions .github/workflows/unit-fast-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Fast unit tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
fast-unit-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Fast unit tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic unit -- -vvv
26 changes: 26 additions & 0 deletions .github/workflows/unit-full-opensuse-leap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Full unit tests

on:
push:
branches: [openSUSE/release/3006.0]
pull_request:
branches: [openSUSE/release/3006.0]
workflow_dispatch:

jobs:
full-unit-tests:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: 1
container:
image: registry.opensuse.org/systemsmanagement/saltstack/products/testing/containers/leap15.5/containers/salt-testsuite-github:leap15.5
options: --hostname=salt-test-container
steps:
- name: Checkout Salt
uses: actions/checkout@v4
- name: Fix the Salt version in _version.txt file
run: rpm -q python3-salt-testsuite --queryformat '%{VERSION}' > $GITHUB_WORKSPACE/salt/_version.txt
- name: Run Full unit tests
run: |
salt-test --skiplist https://raw.githubusercontent.com/openSUSE/salt-test-skiplist/main/skipped_tests.toml \
--directory . --package-flavor classic unit -- --core-tests --slow --run-expensive --ssh-tests --run-destructive -vvv
39 changes: 0 additions & 39 deletions .github/workflows/unit-opensuse-leap.yml

This file was deleted.

0 comments on commit 30103dd

Please sign in to comment.