From d0d62b50019eb98a03fe9899c011ac40c0ff8174 Mon Sep 17 00:00:00 2001 From: Sergey Gulin Date: Fri, 1 Sep 2023 15:53:26 +0300 Subject: [PATCH] fixup! test --- .github/workflows/check.yml | 70 +++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 73e7a70..a59fd60 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,12 +1,78 @@ +# SPDX-FileCopyrightText: 2022 Serokell +# +# SPDX-License-Identifier: MPL-2.0 + name: CI -on: [push] +on: + # pull_request: + push: + # - master + # - staging jobs: + validate: + runs-on: [self-hosted, nix] + steps: + - uses: actions/checkout@v3 + + - name: check trailing whitespaces + run: nix build -L .#checks.x86_64-linux.trailing-whitespace + + - name: shellcheck + run: nix build -L .#checks.x86_64-linux.shellcheck + + - name: validate cabal files + run: nix develop .#ci -c ./scripts/validate-cabal-files.sh + + - name: stylish + run: nix build -L .#checks.x86_64-linux.stylish-haskell + + - name: lint + run: nix build -L .#checks.x86_64-linux.hlint + + build: + runs-on: [self-hosted, nix] + steps: + - uses: actions/checkout@v3 + + - name: build + run: nix build -L .#checks.x86_64-linux.build-all + + - name: xrefcheck + run: nix run github:serokell/xrefcheck + + - name: REUSE lint + run: nix build -L .#checks.x86_64-linux.reuse-lint + test: runs-on: [self-hosted, nix] + needs: [build] steps: - uses: actions/checkout@v3 - name: test - run: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks --dry-activate + run: nix build -L .#checks.x86_64-linux.test + + - name: doctest + run: nix develop .#doctest -c runghc doctest/doctests.hs + + deploy: + runs-on: [self-hosted, nix] + needs: [test] + if: ${{ github.ref == 'refs/heads/staging' }} + steps: + - uses: actions/checkout@v3 + + - name: deploy staging + run: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks + + + + + + + + + # - name: test + # run: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks