diff --git a/.actrc b/.actrc new file mode 100644 index 0000000..6cba56c --- /dev/null +++ b/.actrc @@ -0,0 +1,2 @@ +--platform ubuntu-latest=myoung34/github-runner:latest +--container-cap-add SYS_ADMIN \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..98a6602 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,15 @@ +name: "ci-checks" +on: + pull_request: + push: +jobs: + tests: + name: verify nix shell is properly instantiated for no pre-installed nix + runs-on: ubuntu-latest + steps: + - uses: + actions/checkout@v2.4.0 + # Flakes do not like shallow clones + with: + fetch-depth: 0 + - run: ./nix-shell.sh diff --git a/DEVELOPMENT-CI.md b/DEVELOPMENT-CI.md new file mode 100644 index 0000000..06ef249 --- /dev/null +++ b/DEVELOPMENT-CI.md @@ -0,0 +1,10 @@ +# Development of GitHub Actions + +## Using `act` to run workflow locally + +1. Make sure docker is running and available, ex. `docker run hello-world` +2. Run: `docker pull nektos/act-environments-ubuntu:18.04-full` - this will take significant amount of time so make sure it doesn't block your work +3. Run: `act`, it should start container and run workflow! + +To specify which workflow to run, use `-w {path_to_yaml}` when running `act`. +Check `act --help` for more informations. \ No newline at end of file diff --git a/scripts/nix.conf b/scripts/nix.conf index 463f447..f0fff0f 100644 --- a/scripts/nix.conf +++ b/scripts/nix.conf @@ -4,3 +4,6 @@ keep-derivations = true keep-outputs = true require-sigs = false sandbox = true +enforce-determinism = true +log-lines = 100 +repeat = 1 \ No newline at end of file diff --git a/scripts/shell.nix b/scripts/shell.nix index 18425f6..d3c7aa6 100644 --- a/scripts/shell.nix +++ b/scripts/shell.nix @@ -13,6 +13,8 @@ pkgs.mkShell { # Dynamically load nix envs nix-direnv shellcheck + act + docker ]; TERM = "xterm";