Skip to content

Commit

Permalink
Completely remove smart contracts (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshOrndorff committed Jan 7, 2024
1 parent b743f8a commit 5ba0b1d
Show file tree
Hide file tree
Showing 40 changed files with 128 additions and 16,292 deletions.
20 changes: 0 additions & 20 deletions .github/scripts/interact-with-contract.sh

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/contracts-unit-test-suite.yml

This file was deleted.

35 changes: 8 additions & 27 deletions .github/workflows/e2e-tests-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,23 @@ jobs:
- name: Checkout Source code
uses: actions/checkout@v3

- name: Cache cargo
uses: actions/cache@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
/tmp/academy-pow/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1

- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1
cache-targets: true

- name: build release binary
run: make release
- name: build binary
run: cargo build

- name: Run a node
shell: bash
run: /tmp/academy-pow/target/release/academy-pow --chain local --alice &
# This path is very specific to github actions. There must be a better way to do this, but I can't figure it out.
run: /home/runner/work/Academy-PoW/Academy-PoW/target/debug/academy-pow --dev &

- name: Verify chain responds
shell: bash
run: |
alias curl='docker run -it --rm curlimages/curl:8.1.2'
curl --retry 12 --retry-all-errors --retry-delay 3 -H "Content-Type: application/json" -d '{ "id": 1, "jsonrpc": "2.0", "method": "rpc_methods"}' http://127.0.0.1:9944
- name: Verify contract interaction
shell: bash
run: ./.github/scripts/interact-with-contract.sh

# - name: Deploy contracts
# shell: bash
# run: ./scripts/deploy.sh
#
# - name: Test basic contract interactions
# shell: bash
# run: ./scripts/interact.sh
5 changes: 0 additions & 5 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Workflow inspired by https://docs.github.com/en/actions/publishing-packages/publishing-docker-images

# This is currently somewhat redundant with the docker stuff in e2e-tests-suite.yml
# This one is nice because it publishes the docker image to a registry so that students can
# easily download it to their local systems or their servers. Ideally those e2e tests would be able
# to use this same docker container somehow.

name: Create and publish a Docker image

on:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/unit-tests-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ jobs:
- name: Checkout Source code
uses: actions/checkout@v3

- name: Cache cargo
uses: actions/cache@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
/tmp/academy-pow/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1
cache-targets: true

- name: Run fmt
run: cargo fmt --all
Expand Down
Loading

0 comments on commit 5ba0b1d

Please sign in to comment.