-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (85 loc) · 2.68 KB
/
pull-request.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI Build and Test Workflow
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# with:
# version: "lab:latest"
# driver: cloud
# endpoint: "dataprocessor/github"
# cleanup: true
# - name: Build and cache Docker image
# uses: docker/build-push-action@v5
# with:
# file: environment.dockerfile
# tags: "dataprocessor/hdp-cairo:latest"
#
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Cache Python environment
uses: actions/cache@v3
with:
path: |
~/.cache/pip
venv
key: ${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('tools/make/setup.sh') }}
restore-keys: |
${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('tools/make/setup.sh') }}
${{ runner.os }}-python-
# Cache Cargo directories
- name: Print current working directory and list contents
run: |
pwd
ls -lah
- name: Cache Cargo directories
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
/home/runner/work/hdp-cairo/hdp-cairo/cairo-vm/cairo1-run
key: ${{ runner.os }}-cargo-${{ hashFiles('tools/make/install_cairo1_run.sh') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Dependencies
run: make setup
# - name: Check Python formatting
# run: |
# source venv/bin/activate
# ./tools/make/python_format_check.sh
#
# - name: Check Cairo formatting
# run: |
# source venv/bin/activate
# ./tools/make/cairo_format_check.sh
# - name: Compile Cairo files
# run: |
# source venv/bin/activate
# make build
# - name: Run Unit Cairo tests
# env:
# RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}
# run: |
# source venv/bin/activate
# ./tools/make/cairo_tests.sh
# - name: Run Full Flow tests
# run: |
# source venv/bin/activate
# ./tools/make/full_flow_test.sh