Github action to use an Attic binary cache https://cachix.org
  • TypeScript 67.8%
  • Nix 26.9%
  • JavaScript 5.3%
Find a file
2019-10-03 13:48:28 +02:00
.github/workflows push -> name 2019-10-03 13:48:28 +02:00
__tests__ saneSplit -> nonEmptySplit 2019-10-03 13:26:42 +02:00
lib push -> name 2019-10-03 13:48:28 +02:00
src push -> name 2019-10-03 13:48:28 +02:00
.gitignore Initial commit 2019-09-30 15:32:36 +02:00
action.yml push -> name 2019-10-03 13:48:28 +02:00
jest.config.js Initial commit 2019-09-30 15:32:36 +02:00
LICENSE Split Nix installation into separate action 2019-10-02 16:25:24 +02:00
package.json Split Nix installation into separate action 2019-10-02 16:25:24 +02:00
README.md push -> name 2019-10-03 13:48:28 +02:00
test.nix Install Nix via the action 2019-10-01 11:54:05 +02:00
tsconfig.json Initial commit 2019-09-30 15:32:36 +02:00
yarn.lock Install Nix via the action 2019-10-01 11:54:05 +02:00

cachix-action

github actions badge

Build software only once using Nix with the help of Cachix.

Usage

  1. Login to Cachix and create a new cache. Backup the signing key in the process.

  2. As an admin of your github repository:

    1. Click on Settings
    2. Secrets
    3. Add your signing key value under name CACHIX_SIGNING_KEY.
  3. Create .github/workflows/test.yml in your repo with the following contents:

name: "Test"
on:
  pull_request:
  push:
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: cachix/install-nix-action@v2
    - uses: cachix/cachix-action@v1
      with:
        name: cachix-action
        signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
        # Only needed for private caches
        authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

Hacking

Install the dependencies

$ yarn install

Build the typescript

$ yarn build

Run the tests ✔️

$ yarn test