diff --git a/.gitea/workflows/test-and-build.yml b/.gitea/workflows/test-and-build.yml index 10bdd07..a4c4a28 100644 --- a/.gitea/workflows/test-and-build.yml +++ b/.gitea/workflows/test-and-build.yml @@ -13,26 +13,30 @@ on: jobs: test: container: - image: debian:bullseye-slim + image: docker.matri.cx/nix-runner:latest + credentials: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} steps: - - name: Install prerequisites - run: | - apt-get update && apt-get install -y \ - curl \ - sudo \ - xz-utils \ - gnupg \ - && rm -rf /var/lib/apt/lists/* - - - name: Install Nix with nix install - run: | - curl -L https://nixos.org/releases/nix/nix-2.15.0/install | sh - . /etc/profile.d/nix.sh - - name: Checkout code uses: actions/checkout@v3 - - name: Enter development shell and run tests + - name: Install dependencies and run tests run: | - . /etc/profile.d/nix.sh nix develop --command cabal test + + build: + needs: test + container: + image: docker.matri.cx/nix-runner:latest + credentials: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build binary + run: | + nix build + ls -alh ./result/bin/tricu