Files
yarn-plugin-nixify-patched/.github/workflows/build.yml
T
2020-12-01 15:19:34 +01:00

64 lines
1.3 KiB
YAML

name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Yarn cache
uses: actions/cache@v2
with:
path: .yarn/cache
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: yarn-
- name: Yarn install
run: yarn install --immutable
- name: TypeScript
run: yarn check
- name: Build
run: yarn build
- name: Check dist
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
echo "Build in dist/ is outdated"
exit 1
fi
- name: Install plugin
run: yarn plugin import ./dist/yarn-plugin-nixify.js
- name: Test without Nix
run: yarn
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v4
- name: Setup Cachix
if: github.event_name == 'push' && github.repository_owner == 'stephank'
uses: cachix/cachix-action@v8
with:
name: stephank
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Test with Nix
run: yarn
- name: Test nix-build
run: nix-build
env:
NIX_PATH: nixpkgs=channel:nixpkgs-unstable