Skip to content

Port to Native CW Migration #49

Port to Native CW Migration

Port to Native CW Migration #49

Workflow file for this run

name: Integration Tests
on: [pull_request]
jobs:
tests:
name: ${{ matrix.make.name }} (${{ matrix.os }})
runs-on: ubuntu-latest # Specifies the runner environment
container:
image: alpine:latest # Specifies that an Alpine Linux container should be used for executing the job's steps
strategy:
fail-fast: false
matrix:
rust: [1.73.0]
make:
- name: Run integration tests # Integration tests
task: "(cd deployment && NODE_TYPE=LocalSecret ./gradlew jvmTest --build-cache --no-daemon)"
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
RUSTV: ${{ matrix.rust }}
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: /home/runner/.cache/sccache
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out
# Service containers to run with `container-job`
services:
# Label used to access the service container
secret:
# Docker Hub image
image: ghcr.io/scrtlabs/localsecret:v1.12.0-beta.8
ports:
# Opens tcp port
- 5000:5000
- 9091:9091
- 1317:1317
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
apk --no-cache update
apk --no-cache add curl tar make gcc g++ musl-dev openjdk11 rust cargo binaryen rustup
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Locate rustup
run: |
find / -name rustup 2>/dev/null
- name: Install sccache
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.2.15
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Add wasm toolchain
run: |
rustup target add wasm32-unknown-unknown
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Save sccache
uses: actions/cache@v2
continue-on-error: false
with:
path: ${{ matrix.sccache-path }}
key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-
- name: Start sccache server
run: sccache --start-server
- name: Compile code
run: make build
- name: ${{ matrix.make.name }}
run: ${{ matrix.make.task }}
- name: Print sccache stats
run: sccache --show-stats
- name: Stop sccache server
run: sccache --stop-server || true