This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
62 lines (52 loc) · 1.97 KB
/
slow-tests.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Slow Tests
on:
push:
workflow_dispatch:
env:
RUST_TEST_THREADS: 4
# TODO: remove this or increase this when contract size limit is not a problem
SOLC_OPTIMIZER_RUNS: 20
jobs:
build:
runs-on: self-hosted
container:
image: ghcr.io/spectrumxyz/nix:main
credentials:
username: ancient123
password: ${{ secrets.ORG_GITHUB_PAT }}
volumes:
- github_nix_251:/nix
steps:
- uses: styfle/cancel-workflow-action@0.9.1
name: Cancel Outdated Builds
with:
access_token: ${{ github.token }}
- name: Install Tools
# git not installed by default
# alpine default tar is not compatible: https://stackoverflow.com/a/64187955
run: |
apk add --no-cache tar git
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- uses: actions/checkout@v2
name: Checkout Repository
- name: Initialize Nix Shell
run: nix-shell --run "echo Init"
- name: Configure Git
run: |
git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com".insteadOf git://github.com
git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com".insteadOf ssh://git@github.com
git config --global url."https://dl.cloudsmith.io/${{ secrets.CLOUDSMITH_ENTITLEMENT }}/".insteadOf https://dl.cloudsmith.io/basic/
- name: Cache cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
target
# todo: add nix key, for example: nix-instantiate shell.nix | sha256sum | head -c 10
key: cape-v3-${{ hashFiles('Cargo.lock') }}
- name: Run Tests
run: nix-shell --run "prepend-timestamps cape-test-geth-slow"