From f17c02ce62afe6dcdbe864cc8e8a5f9102b30b62 Mon Sep 17 00:00:00 2001 From: treeform Date: Sun, 24 May 2026 21:00:01 -0700 Subject: [PATCH] migrate ci to nimby --- .github/workflows/build.yml | 35 +++++++++++++++-------------------- .github/workflows/docs.yml | 20 ++++++++++++-------- tests/{test.nim => tests.nim} | 0 3 files changed, 27 insertions(+), 28 deletions(-) rename tests/{test.nim => tests.nim} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0061164..2501d83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,30 +1,25 @@ name: Github Actions -on: [push, pull_request] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: jobs: build: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: jiro4989/setup-nim-action@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - run: nim c src/ws.nim - - run: nim c -r tests/test.nim - - run: nim c tests/chat.nim - - run: nim c tests/chat.nim - - run: nim c tests/echo.nim - - run: nim c tests/sender.nim - - run: nim c tests/sender_3.nim - - run: nim c tests/sender_ping.nim - - run: nim c tests/sender_protocol.nim - - run: nim c tests/sender_wss.nim - - run: nim c tests/welcome.nim - - run: nim c tests/welcome_protocol.nim - - run: nimble install -y jester - - run: nim c tests/jester_test.nim + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + - name: Install dependencies + shell: bash + run: | + cd .. + nimby install -g "${{ github.event.repository.name }}/${{ github.event.repository.name }}.nimble" + - run: nim r tests/tests.nim diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 683a6b5..053ac82 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,24 +3,28 @@ on: push: branches: - master + workflow_dispatch: +permissions: + contents: write env: - nim-version: 'stable' nim-src: src/${{ github.event.repository.name }}.nim deploy-dir: .gh-pages jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: jiro4989/setup-nim-action@v1 - with: - nim-version: ${{ env.nim-version }} - - run: nimble install -Y - - run: nimble doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} + - uses: actions/checkout@v5 + - uses: treeform/setup-nim-action@v6 + - name: Install dependencies + shell: bash + run: | + cd .. + nimby install -g "${{ github.event.repository.name }}/${{ github.event.repository.name }}.nimble" + - run: nim doc --index:on --project --git.url:https://github.com/${{ github.repository }} --git.commit:master --out:${{ env.deploy-dir }} ${{ env.nim-src }} - name: "Copy to index.html" run: cp ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html - name: Deploy documents - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ${{ env.deploy-dir }} diff --git a/tests/test.nim b/tests/tests.nim similarity index 100% rename from tests/test.nim rename to tests/tests.nim