Skip to content

Fixed tests

Fixed tests #322

Workflow file for this run

name: Docker
on:
push:
jobs:
main:
strategy:
matrix:
include:
- unity_docker_image: unityci/editor:2022.3.12f1-webgl-3.0.0
service_name: asset-bundle-converter
platform_target: webgl
- unity_docker_image: unityci/editor:2022.3.12f1-windows-mono-3.0.0
service_name: asset-bundle-converter-windows
platform_target: windows
- unity_docker_image: unityci/editor:2022.3.12f1-mac-mono-3.0.0
service_name: asset-bundle-converter-mac
platform_target: mac
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: quay.io/decentraland/${{ matrix.service_name }}:next,quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }}
#load: true
# cache-from: type=gha
# cache-to: type=gha,mode=max
build-args: |
COMMIT_HASH=${{ github.sha }}
UNITY_DOCKER_IMAGE=${{ matrix.unity_docker_image }}
PLATFORM_TARGET=${{ matrix.platform_target }}
- name: Create $(pwd)/tmp/Unity/Unity_lic.ulf
run: mkdir -p $(pwd)/tmp/Unity && echo "$UNITY_2021_ULF" > $(pwd)/tmp/Unity/Unity_lic.ulf
env:
UNITY_2021_ULF: ${{ secrets.UNITY_2021_ULF }}
- name: Run tests
run: |
docker run \
-v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \
-v $(pwd):/app \
quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \
sh -c "cd /app ; ls -la ; chmod +x ci-editmode-test.sh ; ./ci-editmode-test.sh"
- name: Run test conversion of urn:decentraland:off-chain:base-avatars:brown_pants
run: |
docker run \
-v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \
quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \
node --trace-warnings --abort-on-uncaught-exception --unhandled-rejections=strict dist/test-conversion.js \
--baseUrl https://peer.decentraland.org/content \
--pointer urn:decentraland:off-chain:base-avatars:brown_pants \
--outDir /tmp-ab \
--logFile /tmp-ab/log.txt
- name: Trigger deployment
id: deploy
uses: decentraland/dcl-deploy-action@main
if: ${{ github.ref == 'refs/heads/main' }}
with:
dockerImage: quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }}
serviceName: ${{ matrix.service_name }}
env: dev prd
token: ${{ secrets.GITHUB_TOKEN }}