Skip to content

Commit

Permalink
copy remaining buildkite workflows to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekleog-NEAR committed Oct 27, 2023
1 parent 68eed17 commit 93716ac
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/backward_compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Backward compatibility

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
merge_group:

jobs:
cargo_nextest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
cd pytest
pip3 install --user -r requirements.txt
pwd
ls ..
python3 tests/sanity/backward_compatible.py
ls ../target/debug
20 changes: 20 additions & 0 deletions .github/workflows/db_migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Upgradability

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
merge_group:

jobs:
cargo_nextest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
cd pytest
pip3 install --user -r requirements.txt
python3 tests/sanity/db_migration.py
23 changes: 23 additions & 0 deletions .github/workflows/protobuf_backward_compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Protobuf backwards compatibility

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
merge_group:

jobs:
cargo_nextest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: sudo apt install npm
- run: npm install @bufbuild/buf
# We need to manually fetch the latest commit of master to
# correctly compute the commit at which we should diff the proto
# files. Apparently the pipeline doesn't do that for us.
- run: git fetch origin
- run: buf breaking --against ".git#ref=`git merge-base origin/master HEAD`"
50 changes: 50 additions & 0 deletions .github/workflows/sanity_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Sanity checks

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
merge_group:

jobs:
cargo_nextest:
runs-on: ubuntu-22.04-16core
strategy:
fail-fast: false
timeout-minutes: 90

steps:
- uses: actions/checkout@v2
- run: cargo build -p neard --bin neard --features nightly
- name: run spin_up_cluster.py
# Note: We're not running spin_up_cluster.py for non-nightly
# because spinning up non-nightly clusters is already covered
# by other steps in the CI, e.g. upgradable.
run: |
cd pytest
python3 -m pip install --progress-bar off --user -r requirements.txt
python3 tests/sanity/spin_up_cluster.py
- run: cargo build -p neard --bin neard
- run: python3 scripts/state/update_res.py check

- run: python3 scripts/check_nightly.py
- run: python3 scripts/check_pytests.py
- run: python3 scripts/check_fuzzing.py

- run: python3 scripts/fix_nightly_feature_flags.py

- run: ./scripts/formatting --check

- name: check rpc_errors_schema.json
- run: |
rm -f target/rpc_errors_schema.json
cargo check -p near-jsonrpc --features dump_errors_schema
if ! git --no-pager diff --no-index chain/jsonrpc/res/rpc_errors_schema.json target/rpc_errors_schema.json; then
set +x
echo 'The RPC errors schema reflects outdated typing structure; please run'
echo ' ./chain/jsonrpc/build_errors_schema.sh'
exit 1
fi >&2
20 changes: 20 additions & 0 deletions .github/workflows/upgradability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Upgradability

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
merge_group:

jobs:
cargo_nextest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
cd pytest
pip3 install --user -r requirements.txt
python3 tests/sanity/upgradable.py

0 comments on commit 93716ac

Please sign in to comment.