mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 12:05:18 +00:00
967c6857e8
* build & publish rocksdb docker images merge to master * publish docker images on push of release version tags NOTE: New docker image tag pattern. ALL tags now include database suffix ex. <githash>-goleveldb, v0.25.0-alpha.1-rocksdb, master-rocksdb, etc * update dockerfiles for better caching * update all github action workflow versions * improve caching of go packages * cache docker image layers for reuse between runs * update dockerignore to remove non-essential files
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
name: Continuous Integration (Default Checks)
|
|
|
|
on:
|
|
workflow_call:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
cache-dependency-path: |
|
|
go.sum
|
|
tests/e2e/kvtool/go.sum
|
|
- name: build application
|
|
run: make build
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
cache-dependency-path: |
|
|
go.sum
|
|
tests/e2e/kvtool/go.sum
|
|
- name: run unit tests
|
|
run: make test
|
|
- name: run e2e tests
|
|
run: make docker-build test-e2e
|
|
validate-internal-testnet-genesis:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
- name: save version of kava that will be deployed if this pr is merged
|
|
id: kava-version
|
|
run: |
|
|
echo "KAVA_VERSION=$(cat ./ci/env/kava-internal-testnet/KAVA.VERSION)" >> $GITHUB_OUTPUT
|
|
- name: checkout repo from master
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
- name: checkout version of kava that will be deployed if this pr is merged
|
|
run: |
|
|
git pull -p
|
|
git checkout $KAVA_VERSION
|
|
env:
|
|
KAVA_VERSION: ${{ steps.kava-version.outputs.KAVA_VERSION }}
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: build kava cli
|
|
run: make install
|
|
- name: checkout repo from current commit to validate current branch's genesis
|
|
uses: actions/checkout@v4
|
|
- name: validate testnet genesis
|
|
run: kava validate-genesis ci/env/kava-internal-testnet/genesis.json
|
|
validate-protonet-genesis:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo from current commit
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: go.mod
|
|
- name: build kava cli
|
|
run: make install
|
|
- name: validate protonet genesis
|
|
run: kava validate-genesis ci/env/kava-protonet/genesis.json
|