-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run test suite in GH Actions #195
Changes from 1 commit
c664564
4398682
f00392c
138c68f
3f85185
6df2251
58eb4a6
74ce274
3981d6d
8963472
3901a70
6addbf5
a9d65e4
db1c0d1
e0f1d3f
1ef46dd
1e77e84
859d35d
f974d80
cbf2dd5
86ed208
dfb3521
25bf74a
6ae65d2
2cacb29
3fb1efe
4e1255d
52e7741
a1edfd3
d57513a
1ebb329
33fc388
1e87c3f
9d4ed13
b6ce528
b0ae5a8
f1effbe
08476bd
20aad9e
ec8f244
b429b2f
6b8cebd
8a7b287
6c2aa53
d6092c7
834b66f
74cc4bf
6ffdd16
ce2605f
6faabb1
1b1f757
7c37c49
be90c34
9daea44
b9dbacd
161951d
c5707f5
e3fc37f
07382a7
6662187
4759451
556b289
d809c8e
906fb11
2a0d98a
d29aa47
cc1f55a
45f1cb1
623861e
a2a6c8f
8175f81
9bf106a
a7d6f9f
8fc1e0c
2bc6030
a999c7c
63e0730
57681b2
aee0c9c
40a030f
b42aed5
1b148eb
781ae1d
eab164b
65f4210
4aa142d
0552be1
011f287
a40b199
a702503
f71eb21
ecb0204
6a1081d
529f036
48ff808
a5faa23
8fb6350
fbf4cc0
d3ae97e
957e2b0
2c5e547
3d0290d
bfde90b
8675452
1631266
d02fb9e
a24a60a
6c4719c
e034d68
d96a9f8
a38175a
a88be08
be89de7
fae09c8
3b74c75
8aa352f
12afd7b
76b9e06
f86b5f9
06945fa
d0d2336
31a4d39
57db0c6
3e1a680
092947f
9cab72e
eda3a10
ebbc643
f6ec123
d6c785f
2a326a1
51f792e
e9eda04
c534d99
acec27f
e172778
2116fdd
882edd6
af35cfd
d93559b
79a5beb
f06c63f
48a67e1
69415d3
f17bc76
13d4987
3833a5c
e2428b1
ea2f282
68ef1a6
a44147d
e1a3346
9fa89ad
7491cfe
08a9702
7c66add
6699032
f55a9cc
811645e
e0b11fb
eaa6038
ca3fcac
a794029
1bc911c
056d071
08de190
0fd2550
5560ebb
3574f1c
9720a46
dcebb12
eaeaf76
4bb7ff5
20171e5
7314df0
5a79ac6
757dc06
a173b47
180b749
449f237
d502568
7194171
7943db0
f362792
c903077
459c8c9
98743aa
c2357a2
887fd9a
a55571b
7691ac2
f0dcba3
30eba4e
458daed
aefedb0
7dc7e88
098ebe6
3d7de31
aac3c89
e51e266
2339d60
c995019
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
checks: | ||
timeout-minutes: 45 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-11] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Fetch source code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
.cargo/bin/ | ||
.cargo/registry/index/ | ||
.cargo/registry/cache/ | ||
.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo- | ||
|
||
- name: Setup Xcode version | ||
if: ${{ runner.os == 'macOS' }} | ||
uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: latest-stable | ||
|
||
- name: Check macOS version | ||
if: ${{ runner.os == 'macOS' }} | ||
run: sw_vers | ||
|
||
- name: Set up nix | ||
uses: cachix/install-nix-action@v16 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-21.05 | ||
extra_nix_config: | | ||
substituters = https://cache.nixos.org https://cache.holo.host https://ci-builds.cachix.org https://holochain-ci.cachix.org | ||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE= cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ= ci-builds.cachix.org-1:fxB0+h/MMlCpXf6hFsQM31YpHbaQoRmcNPNHwDUkXA4= holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8= | ||
Comment on lines
+44
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should consolidate between this way of defining these, and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am referring to this file, and the command in the Release CI workflow that references it |
||
|
||
- uses: cachix/cachix-action@v10 | ||
with: | ||
name: ci-builds | ||
authToken: "${{ secrets.CACHIX_TOKEN }}" | ||
|
||
- name: Inspect nix.conf | ||
run: cat ~/.config/nix/nix.conf | ||
|
||
- name: Install recent bash, and set as NIX_BUILD_SHELL # needed by macos, which has an older bash incompatible with nix | ||
if: ${{ runner.os == 'macOS' }} | ||
run: echo "NIX_BUILD_SHELL=$(nix-build -A bashInteractive '<nixpkgs>')/bin/bash" >> $GITHUB_ENV | ||
|
||
- name: Prepare Nix environment | ||
run: nix-shell --command "echo Completed" | ||
|
||
- run: nix-shell --pure --run 'cargo build' | ||
- run: nix-shell --pure --run 'cargo test' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this repo has the rather anomalous behavior of not checking the
Cargo.lock
file into git, which as I understand it has its reasons, but from my experience has had some real downsidesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my other one, I use
Cargo.toml
, while realizing that that's not best practiceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think this is actually best practice for libraries (but not binaries) — https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, should update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That kinda makes sense. The zomes themselves are more like binaries, while the things in
lib
are libraries, so 🤷 I'm not sureThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More nuanced suggestion here: https://stackoverflow.com/a/63727523