Skip to content

Commit

Permalink
other: Build and test localnet on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
aefhm committed Jan 2, 2025
1 parent 2f9d783 commit 9a7981d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-localnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
strategy:
matrix:
docker_image: [emerald-localnet, sapphire-localnet]
runs-on: ubuntu-latest
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,15 +46,22 @@ jobs:
file: docker/${{ matrix.docker_image }}/Dockerfile
tags: |
ghcr.io/oasisprotocol/${{ matrix.docker_image }}:local
outputs: type=docker,dest=/tmp/${{ matrix.docker_image }}.tar
load: true

- name: Test
timeout-minutes: 3
working-directory: docker/${{ matrix.docker_image }}
run: ./test.sh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.docker_image }}
file: /tmp/${{ matrix.docker_image }}.tar

- name: Push
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }}
uses: docker/build-push-action@v6
with:
build-args: |
Expand All @@ -69,7 +77,7 @@ jobs:
org.opencontainers.image.revision=${{ github.sha }}
- name: Prune old ghcr.io/oasisprotocol/${{ matrix.docker_image }} images
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }}
uses: vlaurin/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 9a7981d

Please sign in to comment.