DDC Smart Contract v.1.0.0 #269
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: 'CI' | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- synchronize | |
- edited | |
workflow_call: | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Install Go' | |
if: success() | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18.x | |
- name: 'Checkout code' | |
uses: actions/checkout@v2 | |
with: | |
submodules: "true" | |
- name: 'Cache go modules' | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
#Core module | |
- name: 'Run linters core module' | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: 'core' | |
version: v1.50 | |
args: --timeout 5m | |
- name: 'Run unit tests core module' | |
run: go test -v ./core/... | |
#Model module | |
- name: 'Run linters model module' | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: 'model' | |
version: v1.50 | |
args: --timeout 5m | |
- name: 'Run unit tests model module' | |
run: go test -v ./model/... | |
#Contentadrstorage module | |
- name: 'Run linters contentadrstorage module' | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: 'contentadrstorage' | |
version: v1.50 | |
args: --timeout 5m | |
- name: 'Run unit tests contentadrstorage module' | |
run: go test -v ./contentadrstorage/... | |
#Contract module | |
- name: 'Run linters contract module' | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: 'contract' | |
version: v1.50 | |
args: --timeout 5m | |
- name: 'Run unit tests contract module' | |
run: go test -v ./contract/... | |
- name: 'Run integrational tests with blockchain emulator' | |
run: go test -v ./test/... |