Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into restore-bump-godot-4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Oct 24, 2024
2 parents a2c342c + 332b69b commit 6458419
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🐳 Docker builds
name: 🐳 Docker builds and test
on:
workflow_call:
secrets:
Expand All @@ -13,7 +13,7 @@ concurrency:

jobs:
build-images:
name: Build images
name: Build images and test
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
Expand All @@ -28,14 +28,14 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
image: godot-explorer
tags: ${{ github.sha }}
tags: latest ${{ github.sha }}
dockerfiles: |
./Dockerfile
build-args: |
${{ inputs.build-args }}
COMMIT_HASH=${{ github.sha }}
- name: Push To quay.io
if: github.ref == 'refs/heads/main' # TODO: Push only on tags / releases?
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
Expand All @@ -45,5 +45,23 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
- name: Run avatar test
run: |
mkdir -p output
podman run --rm -v \
$(pwd)/tests/avatars-test-input.json:/app/avatars.json \
-v $(pwd)/output:/app/output localhost/godot-explorer:latest
- name: Compare images with snapshots
run: |
cargo run -- compare-image-folders \
--snapshots tests/snapshots/avatar-image-generation/ \
--result ${{ github.workspace }}/output/
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: avatar-snapshots
path: |
${{ github.workspace }}/output/**/*
31 changes: 0 additions & 31 deletions .github/workflows/docker_tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +0,0 @@
name: 🧪 Docker tests
on:
workflow_call:

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-docker-tests
cancel-in-progress: true

jobs:
test-image:
name: Test Docker image
runs-on: ubuntu-22.04

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Run avatar test
run: |
mkdir -p output
docker run --rm \
-v $(pwd)/tests/avatars-test-input.json:/app/avatars.json \
-v $(pwd)/output:/app/output \
quay.io/decentraland/godot-explorer:${{ github.sha }}
- name: Compare images with snapshots
run: |
ls -la output/
cargo run -- compare-image-folders \
--snapshots tests/snapshots/avatar-image-generation/ \
--result ${{ github.workspace }}/output/
5 changes: 2 additions & 3 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install


# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install

# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,11 @@ jobs:
needs: static-checks
uses: ./.github/workflows/windows_builds.yml

# Third stage: Extra ci
docker-build:
name: 🐳 Docker builds
# Third stage: Extras
docker-build-test:
name: 🐳 Docker builds and test
needs: linux-build
uses: ./.github/workflows/docker_builds.yml
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/docker_build_test.yml
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

docker-tests:
name: 🧪 Docker tests
needs: docker-build
uses: ./.github/workflows/docker_tests.yml
5 changes: 2 additions & 3 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ jobs:
- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Install
# Build section
- name: Cargo install
run: cargo run -- install


# Build section
- name: Build
working-directory: lib
run: cargo build --release
Expand Down

0 comments on commit 6458419

Please sign in to comment.