From cdbf6a8fb3f0efa2be3107e94f9841d1c2fb5a5c Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Fri, 23 Aug 2024 23:06:26 +0200 Subject: [PATCH] update workflow --- .github/workflows/test.yml | 68 ++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 40 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67d472a..262b170 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,18 +8,8 @@ on: branches: ["main"] jobs: build: - strategy: - fail-fast: false - matrix: - include: - - name: Linux - os: ubuntu-latest - # - name: macOS - # os: macos-latest - # - name: Windows - # os: windows-latest - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} + name: 'Build docker image' + runs-on: 'ubuntu-latest' steps: - uses: actions/checkout@v4 with: @@ -30,23 +20,20 @@ jobs: run: | brew install docker colima start - - - run: docker build -t lean4monaco . - # - name: Set up Docker - # uses: docker/setup-buildx-action@v3 - # - name: Build server docker image - # uses: docker/build-push-action@v6 - # with: - # push: false - # tags: lean4monaco:latest - # outputs: type=docker,dest=/tmp/lean4monaco.tar - # - name: Upload artifact - # uses: actions/upload-artifact@v4 - # with: - # name: lean4monaco - # path: /tmp/lean4monaco.tar - # # test: - # # needs: build + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + - name: Build server docker image + uses: docker/build-push-action@v6 + with: + tags: lean4monaco:latest + outputs: type=docker,dest=/tmp/lean4monaco.tar + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: lean4monaco + path: /tmp/lean4monaco.tar + test: + needs: build # # strategy: # # fail-fast: false # # matrix: @@ -59,10 +46,11 @@ jobs: # # os: windows-latest # # name: ${{ matrix.name }} # # runs-on: ${{ matrix.os }} - # # steps: - # - uses: actions/checkout@v4 - # with: - # submodules: true + runs-on: 'ubuntu-latest' + steps: + - uses: actions/checkout@v4 + with: + submodules: true # - uses: leanprover/lean-action@v1 # if: matrix.os != 'windows-latest' # with: @@ -90,13 +78,13 @@ jobs: # - name: Build # run: npm run build # - run: npm run setup_demo - # - name: Download server image - # uses: actions/download-artifact@v4 - # with: - # name: lean4monaco - # path: /tmp - # - name: Load server image - # run: docker load --input /tmp/lean4monaco.tar + - name: Download server image + uses: actions/download-artifact@v4 + with: + name: lean4monaco + path: /tmp + - name: Load server image + run: docker load --input /tmp/lean4monaco.tar - name: Start server run: docker run -dit -p 5173:5173 -p 8080:8080 lean4monaco - name: Run tests