mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-09 22:31:53 +00:00
Updating actions
This commit is contained in:
parent
a3971ee993
commit
d4cc7c1184
1 changed files with 14 additions and 14 deletions
28
.github/workflows/test-linux.yml
vendored
28
.github/workflows/test-linux.yml
vendored
|
@ -77,13 +77,22 @@ jobs:
|
|||
## DGM run: |
|
||||
## DGM pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
# We need to get the version here and make it an environment variable
|
||||
# It is used to install via bootstrap and in the test
|
||||
# The version is in the instance name
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
vt_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
|
||||
|
||||
- name: "Pull container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
docker pull ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }}
|
||||
|
||||
- name: "Create container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
/usr/bin/docker create --name ${{ github.run_id }}_salt-test --workdir /_w/ --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/salt-bootstrap/salt-bootstrap":"/_w/btstrap" --entrypoint "/usr/lib/systemd/systemd" ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }} --systemd --unit rescue.target
|
||||
/usr/bin/docker create --name ${{ github.run_id }}_salt-test --workdir /_w/ --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -e ${{ GITHUB_ENV }} -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/salt-bootstrap/salt-bootstrap":"/_w/btstrap" --entrypoint "/usr/lib/systemd/systemd" ghcr.io/saltstack/salt-ci-containers/testing:${{ inputs.container-slug }} --systemd --unit rescue.target
|
||||
|
||||
- name: "Start container ${{ inputs.container-slug }}"
|
||||
run: |
|
||||
|
@ -102,21 +111,12 @@ jobs:
|
|||
- name: "Install Python Dependencies with pip breakage in container ${{ inputs.container-slug }}"
|
||||
if: ${{ ( inputs.distro-slug == 'debian-11' ) || ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) }}
|
||||
run: |
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r tests/requirements.txt
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r /_w/btstrap/tests/requirements.txt
|
||||
|
||||
- name: "Install Python Dependencies without pip breakage in container ${{ inputs.container-slug }}"
|
||||
if: ${{ ( inputs.distro-slug != 'debian-11' ) && ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) }}
|
||||
run: |
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r tests/requirements.txt
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
# We need to get the version here and make it an environment variable
|
||||
# It is used to install via bootstrap and in the test
|
||||
# The version is in the instance name
|
||||
# sed 1st - becomes space, 2nd - becomes dot
|
||||
vt_parm_ver=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
|
||||
docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r /_w/btstrap/tests/requirements.txt
|
||||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
|
@ -124,11 +124,11 @@ jobs:
|
|||
bt_arg1=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $1}')
|
||||
bt_arg2=$(echo "${{ matrix.instance }}" | sed 's/-/ /' | sed 's/-/./' | awk -F ' ' '{print $2}')
|
||||
echo "bt parms ,$bt_parms, bt_arg1 ,$bt_arg1, bt_arg2 ,$bt_arg2,"
|
||||
docker exec ${{ github.run_id}}_salt-test sh -x ./bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
|
||||
docker exec ${{ github.run_id}}_salt-test sh -x /_w/btstrap/bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
docker exec ${{ github.run_id}}_salt-test pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||
docker exec ${{ github.run_id}}_salt-test pytest --cache-clear -v -s -ra --log-cli-level=debug /_w/btstrap/tests/integration/
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
|
|
Loading…
Add table
Reference in a new issue