-
Notifications
You must be signed in to change notification settings - Fork 8
35 lines (34 loc) · 1.02 KB
/
ci.yaml
File metadata and controls
35 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: For each commit and PR
on:
push:
pull_request:
jobs:
validation:
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Setup Dynamic Env
run: |
echo "MAKEFLAGS=-j$(nproc)" | tee $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
- name: Install nix
uses: cachix/install-nix-action@018abf956a0a15673dae4932ae26f0f071ac0944
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: lint
run: nix-shell --run "make --keep-going verify"
- name: test
run: nix-shell --run "make test"
- name: go test coverage
run: nix-shell --run "make coverage"
- name: upload codecov
run: bash <(curl -s https://codecov.io/bash)
- name: run example
if: ${{ startsWith(github.ref, 'refs/heads/master') }}
env:
PACKET_ENV: "ci"
PACKET_VERSION: "${GITHUB_SHA}"
ROLLBAR_TOKEN: ${{secrets.ROLLBAR_TOKEN}}
run: nix-shell --run 'make run'