Skip to content

Feat/dockerize

Feat/dockerize #13

Workflow file for this run

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