serokell / coffer

Multi-backend password store with multiple frontends
4 stars 2 forks source link

Replace current CI implementation with Nix-flake based CI #97

Open notgne2 opened 2 years ago

notgne2 commented 2 years ago

Description

We have newer practices for CI systems, so we should probably utilize them here, including our newest addition: mkPipeline, which generates individual pipeline steps for CI out of your flake, as opposed to lumping them all into a nix flake check step.

Related issue(s)

26

:white_check_mark: Checklist for your Pull Request

Related changes (conditional)

Stylistic guide (mandatory)

notgne2 commented 2 years ago

(might take some messing around with, this is my first time setting something up with mkPipeline)

notgne2 commented 2 years ago

that seems to all be working except for weeder, which fails with

weeder: user error (Didn't find exactly 1 cabal file in .)

I might leave figuring that out to somebody that knows more about cabal

notgne2 commented 2 years ago

Setting as draft until https://github.com/serokell/serokell.nix/pull/69 is addressed, then will need to clean up commits

dcastro commented 2 years ago

I noticed that we're missing a few steps we used to have (there may be more):

Also:

Questions:

notgne2 commented 2 years ago

I'll add in the missing test-runnig and try to add all the missing tests too

How do I run these CI steps locally?

With using mkPipeline, it's generating our pipeline steps from what is under packages and checks, the same things that will be built by Nix if you run nix flake check.

notgne2 commented 2 years ago

Adding xrefcheck would be ugly unless we can first deal with https://github.com/serokell/xrefcheck/issues/54 (which would probably ending up looking exactly like this PR)

notgne2 commented 2 years ago

It also seems like "validate cabal files" might be tedious to add, I tried it and it failed while attempting network access, is this because I configured it wrong? or is that step just impure

dcastro commented 2 years ago

It also seems like "validate cabal files" might be tedious to add, I tried it and it failed while attempting network access, is this because I configured it wrong? or is that step just impure

Looks like it's impure. The script validate-cabal-files.sh calls stack2cabal, which I think needs to fetch the stack resolver.