ci: use self-hosted runner in scheduled task #572
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
on: | |
schedule: | |
- cron: '0 9 * * 1-5' | |
pull_request: # !!! Remove after successful testing !!! | |
name: Scheduled checks | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: k8s-infrastructure-generic | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: [ mainnet, mainnet-silo, testnet, testnet-silo ] | |
steps: | |
- 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) || : | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable, nightly | |
target: wasm32-unknown-unknown | |
- name: Cargo Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.profile }}-cargo-test | |
- name: Install dependencies | |
run: | | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt update && sudo apt install -y yarn | |
- name: Setup Node and cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
cache-dependency-path: | | |
etc/eth-contracts | |
etc/tests/uniswap | |
- name: Install cargo-make | |
run: cargo +stable make -V || cargo +stable install cargo-make | |
- name: Build actual neard-sandbox | |
run: scripts/build-neard-sandbox.sh ${{ matrix.profile }} | |
- name: Test ${{ matrix.profile }} | |
run: cargo make --profile ${{ matrix.profile }} test-flow | |
- uses: 8398a7/action-slack@v3 | |
if: failure() | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,action,eventName,job,took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
checks: | |
name: Run checks | |
runs-on: [ self-hosted, heavy ] | |
steps: | |
- 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) || : | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- run: cargo make check | |
- uses: 8398a7/action-slack@v3 | |
if: failure() | |
with: | |
status: ${{ job.status }} | |
fields: repo,message,commit,author,action,eventName,job,took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |