-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from thin-edge/test-isolated-tests
test: use isolated container engines
- Loading branch information
Showing
19 changed files
with
346 additions
and
250 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/*.tar.gz |
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 |
---|---|---|
|
@@ -23,26 +23,38 @@ jobs: | |
run: echo "Approved" | ||
|
||
test: | ||
name: Test ${{ matrix.job.target }} | ||
name: Test ${{ matrix.job.name }} | ||
runs-on: ubuntu-latest | ||
needs: approve | ||
environment: | ||
name: Test Auto | ||
env: | ||
COMPOSE_PROJECT_NAME: ci_${{ matrix.job.target }}_${{github.run_id}}_${{github.run_attempt || '1'}} | ||
DEVICE_ID: ci_${{ matrix.job.target }}_${{github.run_id}}_${{github.run_attempt || '1'}} | ||
TEST_IMAGE: ${{ matrix.job.image }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- { target: tedge-container-bundle } | ||
# docker | ||
- { target: tedge-container-bundle, name: "docker v27", image: "docker:27-dind" } | ||
- { target: tedge-container-bundle, name: "docker v26", image: "docker:26-dind" } | ||
- { target: tedge-container-bundle, name: "docker v25", image: "docker:25-dind" } | ||
- { target: tedge-container-bundle, name: "docker v20", image: "docker:20-dind" } | ||
# podman | ||
- { target: tedge-container-bundle, name: "podman", image: debian-systemd-podman-cli } | ||
- { target: tedge-container-bundle, name: "podman v5", image: "podman-v5" } | ||
# - { target: tedge-container-bundle, name: "podman v4", image: "podman-v4" } | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
|
||
- uses: taiki-e/install-action@just | ||
|
||
- uses: reubenmiller/setup-go-c8y-cli@main | ||
|
@@ -53,20 +65,11 @@ jobs: | |
run: | | ||
touch .env | ||
echo "DEVICE_ID=$DEVICE_ID" >> .env | ||
echo 'C8Y_BASEURL="${{ secrets.C8Y_BASEURL }}"' >> .env | ||
C8Y_DOMAIN=$(echo "${{ secrets.C8Y_BASEURL }}" | sed 's|.*://||g') | ||
echo 'C8Y_USER="${{ secrets.C8Y_USER }}"' >> .env | ||
echo 'C8Y_PASSWORD="${{ secrets.C8Y_PASSWORD }}"' >> .env | ||
# env variables required by the container | ||
echo "TEDGE_C8Y_URL=$C8Y_DOMAIN" >> .env | ||
cat .env | ||
- name: Bootstrap device | ||
run: | | ||
just init | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
@@ -77,10 +80,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
just venv | ||
- name: Start demo | ||
run: | | ||
just start -d | ||
just build-test | ||
- name: Run tests | ||
run: just test | ||
|
@@ -89,18 +89,9 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: reports | ||
name: reports-${{ matrix.job.name }} | ||
path: output | ||
|
||
- name: Stop demo | ||
if: always() | ||
run: just stop -v | ||
|
||
- name: Cleanup Devices | ||
if: always() | ||
run: | | ||
just cleanup "$DEVICE_ID" | ||
- name: Send report to commit | ||
uses: joonvena/[email protected] | ||
with: | ||
|
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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
.env | ||
device-certs/ | ||
|
||
# Artifacts | ||
*.tar | ||
|
||
# python | ||
.venv/ | ||
|
||
# Test | ||
output/ | ||
*.html | ||
*.xml | ||
|
||
# Test artifacts | ||
tests/*.tar.gz |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry
efb92f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Self-Update
Self-Update
Self-Update
Self-Update
Telemetry
Telemetry
Telemetry