forked from canonical/charmed-openstack-upgrader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fce62c1
commit e8c3eec
Showing
3 changed files
with
74 additions
and
68 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 |
---|---|---|
|
@@ -2,11 +2,6 @@ name: Check workflow running linter, unit and functional tests | |
|
||
on: | ||
workflow_call: | ||
outputs: | ||
snap-arm64: | ||
description: "Filename of the built arm64 snap artifact" | ||
value: ${{ jobs.build-arm64.outputs.snap }} | ||
|
||
workflow_dispatch: | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
@@ -70,8 +65,39 @@ jobs: | |
- name: Run mocked-plans tests | ||
run: tox -e mocked-plans | ||
|
||
build-amd64: | ||
name: Build snap amd64 | ||
# build-amd64: | ||
# name: Build snap amd64 | ||
# needs: lint-unit | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 30 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# submodules: true | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.10' | ||
# - name: Install tox | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# python -m pip install tox | ||
# - name: Setup LXD | ||
# uses: canonical/[email protected] | ||
# with: | ||
# channel: latest/stable | ||
# - name: Install snapcraft | ||
# run: sudo snap install snapcraft --classic | ||
# - name: Build snap | ||
# run: make build | ||
# - name: Upload the built snap as an artifact | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: SNAP_FILE | ||
# path: charmed-openstack-upgrader_amd64.snap | ||
|
||
build-arm64: | ||
name: Build snap arm64 | ||
needs: lint-unit | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
@@ -99,58 +125,39 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: SNAP_FILE | ||
path: charmed-openstack-upgrader.snap | ||
path: charmed-openstack-upgrader_arm64.snap | ||
|
||
build-arm64: | ||
needs: lint-unit | ||
name: Build snap arm64 | ||
runs-on: [self-hosted, ARM64] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build snap locally | ||
uses: snapcore/action-build@v1 | ||
id: snapcraft | ||
|
||
- name: Upload locally built snap artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: local-${{ steps.snapcraft.outputs.snap }} | ||
path: ${{ steps.snapcraft.outputs.snap }} | ||
|
||
|
||
func-amd64: | ||
name: Functional tests amd64 | ||
needs: build-amd64 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Setup Juju 2.9/stable environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: lxd | ||
juju-channel: 2.9/stable | ||
- name: Remove tox install by actions-operator | ||
run: sudo apt remove tox -y | ||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Download snap file artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: SNAP_FILE | ||
- name: Run func tests | ||
run: TEST_SNAP=$GITHUB_WORKSPACE/charmed-openstack-upgrader.snap tox -e func | ||
# func-amd64: | ||
# name: Functional tests amd64 | ||
# needs: build-amd64 | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 120 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# submodules: true | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.10' | ||
# - name: Setup Juju 2.9/stable environment | ||
# uses: charmed-kubernetes/actions-operator@main | ||
# with: | ||
# provider: lxd | ||
# juju-channel: 2.9/stable | ||
# - name: Remove tox install by actions-operator | ||
# run: sudo apt remove tox -y | ||
# - name: Install tox | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# python -m pip install tox | ||
# - name: Download snap file artifact | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: SNAP_FILE | ||
# - name: Run func tests | ||
# run: TEST_SNAP=$GITHUB_WORKSPACE/charmed-openstack-upgrader_amd64.snap tox -e func | ||
|
||
func-arm64: | ||
name: Functional tests arm64 | ||
|
@@ -161,10 +168,6 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install jq | ||
run: sudo snap install jq | ||
- name: Install juju-crashdump | ||
run: sudo snap install juju-crashdump --classic | ||
- name: Setup Juju 2.9/stable environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
|
@@ -179,6 +182,6 @@ jobs: | |
- name: Download snap file artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: local-${{ needs.build-arm64.outputs.snap }} | ||
name: SNAP_FILE | ||
- name: Run func tests | ||
run: TEST_SNAP=$GITHUB_WORKSPACE/local-${{ needs.build-arm64.outputs.snap }} tox -e func | ||
run: TEST_SNAP=$GITHUB_WORKSPACE/charmed-openstack-upgrader_arm64.snap tox -e func |
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