CI: remove self-hosted
#866
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
name: spectre-bridge-protocol test automatically | |
on: | |
push: | |
pull_request: | |
branches: ["!main"] | |
workflow_dispatch: | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
jobs: | |
test-cargo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: cargo fmt --manifest-path ./near/contracts/Cargo.toml --all -- --check | |
- run: cargo clippy --manifest-path ./near/contracts/Cargo.toml -- -A clippy::too-many-arguments -D warnings | |
- run: cd near; ./test.sh | |
diff-near-contracts: | |
runs-on: [self-hosted, light] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cd near; ./expand.sh | |
- run: cd near; mkdir -p res; ./build.sh | |
- run: | | |
git diff | |
git status | |
changed_files=$(git status --porcelain --untracked-files=no | wc -l) | |
if [ $changed_files -gt 0 ]; then | |
echo 'Near contracts changed' | |
exit 1 | |
fi | |
test-npm: | |
runs-on: [self-hosted, light] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: cd eth; npm install; npm install -g ganache-cli | |
- run: cd eth; INFURA_API_KEY=${{secrets.WEB3_INFURA_PROJECT_ID}} npm run test:mainnet-fork | |
diff-eth-contracts: | |
runs-on: [self-hosted, light] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: | | |
cd eth | |
npm install | |
npm run flatten | |
npm run storage-layout | |
git diff | |
git status | |
changed_files=$(git status --porcelain --untracked-files=no | wc -l) | |
if [ $changed_files -gt 0 ]; then | |
echo 'Eth contract changed' | |
exit 1 | |
fi | |
test-aurora-fast-bridge: | |
runs-on: ubuntu-latest | |
name: Test aurora fast-bridge | |
steps: | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Test | |
run: | | |
make test-aurora-fast-bridge |