-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Consolidate linter into container run and remove simple test
Signed-off-by: Stefan Berger <[email protected]>
- Loading branch information
1 parent
ea3ca2d
commit 215bc25
Showing
1 changed file
with
6 additions
and
40 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 |
---|---|---|
|
@@ -10,15 +10,6 @@ on: | |
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: hadolint/[email protected] | ||
with: | ||
recursive: true | ||
ignore: DL3018 | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
|
@@ -32,6 +23,12 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run linter | ||
uses: hadolint/[email protected] | ||
with: | ||
recursive: true | ||
ignore: DL3018 | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/[email protected] | ||
|
@@ -74,34 +71,3 @@ jobs: | |
platforms: linux/amd64 | ||
#platforms: linux/amd64,linux/arm/v7,linux/arm/v6 | ||
no-cache: true | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/[email protected] | ||
- name: Start containers | ||
run: | | ||
sudo apt-get install -y docker-compose | ||
docker-compose up --build --force-recreate --detach | ||
- name: Run Tests | ||
run: | | ||
set -x | ||
docker-compose ps | ||
name=$(docker-compose ps | grep swtpm-test | awk '{print $1}') | ||
rc=$(docker wait "${name}") | ||
if [ "${rc}" != "0" ]; then | ||
echo "test failed:" | ||
docker logs "${name}" | ||
exit 1 | ||
fi | ||
- name: Logs | ||
if: always() | ||
run: docker-compose logs | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose down | ||
|