github.com/dim4egster/coreth@v0.10.2/.github/workflows/ci.yml (about) 1 name: CI 2 on: 3 push: 4 branches: 5 - master 6 pull_request: 7 workflow_dispatch: 8 inputs: 9 avalanchegoRepo: 10 description: 'qmallgo github repository' 11 required: true 12 default: 'dim4egster/qmallgo' 13 avalanchegoBranch: 14 description: 'qmallgo branch' 15 required: true 16 default: 'master' 17 18 jobs: 19 lint: 20 name: Lint 21 runs-on: ubuntu-18.04 22 steps: 23 - uses: actions/checkout@v2 24 - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} 25 if: ${{ github.event_name == 'workflow_dispatch' }} 26 uses: actions/checkout@v2 27 with: 28 repository: ${{ github.event.inputs.avalanchegoRepo }} 29 ref: ${{ github.event.inputs.avalanchegoBranch }} 30 path: qmallgo 31 token: ${{ secrets.AVALANCHE_PAT }} 32 - uses: actions/setup-go@v1 33 with: 34 go-version: 1.18 35 - name: change qmallgo dep 36 if: ${{ github.event_name == 'workflow_dispatch' }} 37 run: | 38 go mod edit -replace github.com/dim4egster/qmallgo=./qmallgo 39 go mod tidy 40 go clean -modcache # avoid conflicts with the golangci-lint-action cache 41 - run: ./scripts/lint_allowed_geth_imports.sh 42 shell: bash 43 - name: golangci-lint 44 uses: golangci/golangci-lint-action@v2 45 with: 46 version: v1.47 47 working-directory: . 48 args: --timeout 3m 49 test: 50 name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }}) 51 runs-on: ${{ matrix.os }} 52 strategy: 53 matrix: 54 go: ['1.18'] 55 os: [macos-11.0, ubuntu-18.04, windows-latest] 56 steps: 57 - uses: actions/checkout@v2 58 - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} 59 if: ${{ github.event_name == 'workflow_dispatch' }} 60 uses: actions/checkout@v2 61 with: 62 repository: ${{ github.event.inputs.avalanchegoRepo }} 63 ref: ${{ github.event.inputs.avalanchegoBranch }} 64 path: qmallgo 65 token: ${{ secrets.AVALANCHE_PAT }} 66 - uses: actions/setup-go@v1 67 with: 68 go-version: ${{ matrix.go }} 69 - name: change qmallgo dep 70 if: ${{ github.event_name == 'workflow_dispatch' }} 71 run: | 72 go mod edit -replace github.com/dim4egster/qmallgo=./qmallgo 73 go mod tidy 74 - run: go mod download 75 shell: bash 76 - run: ./scripts/build.sh evm 77 shell: bash 78 - run: ./scripts/build_test.sh 79 shell: bash 80 - run: ./scripts/coverage.sh 81 shell: bash 82 test-race: 83 name: Golang Unit Tests Race Detection v${{ matrix.go }} (${{ matrix.os }}) 84 runs-on: ${{ matrix.os }} 85 strategy: 86 matrix: 87 go: ['1.18'] 88 os: [ubuntu-20.04] 89 steps: 90 - uses: actions/checkout@v2 91 - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} 92 if: ${{ github.event_name == 'workflow_dispatch' }} 93 uses: actions/checkout@v2 94 with: 95 repository: ${{ github.event.inputs.avalanchegoRepo }} 96 ref: ${{ github.event.inputs.avalanchegoBranch }} 97 path: qmallgo 98 token: ${{ secrets.AVALANCHE_PAT }} 99 - uses: actions/setup-go@v1 100 with: 101 go-version: ${{ matrix.go }} 102 - name: change qmallgo dep 103 if: ${{ github.event_name == 'workflow_dispatch' }} 104 run: | 105 go mod edit -replace github.com/dim4egster/qmallgo=./qmallgo 106 go mod tidy 107 - run: go mod download 108 shell: bash 109 - run: ./scripts/build.sh evm 110 shell: bash 111 - run: ./scripts/build_test.sh -race 112 shell: bash 113 e2e: 114 name: Golang E2E Tests v${{ matrix.go }} (${{ matrix.os }}) 115 runs-on: ${{ matrix.os }} 116 strategy: 117 matrix: 118 go: [ '1.18' ] 119 os: [ ubuntu-20.04 ] 120 steps: 121 - uses: actions/checkout@v2 122 - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} 123 if: ${{ github.event_name == 'workflow_dispatch' }} 124 uses: actions/checkout@v2 125 with: 126 repository: ${{ github.event.inputs.avalanchegoRepo }} 127 ref: ${{ github.event.inputs.avalanchegoBranch }} 128 path: qmallgo 129 token: ${{ secrets.AVALANCHE_PAT }} 130 - uses: actions/setup-go@v1 131 with: 132 go-version: ${{ matrix.go }} 133 - name: change qmallgo dep 134 if: ${{ github.event_name == 'workflow_dispatch' }} 135 run: | 136 go mod edit -replace github.com/dim4egster/qmallgo=./qmallgo 137 go mod tidy 138 - name: prepare qmallgo directory for docker copy 139 if: ${{ github.event_name == 'workflow_dispatch' }} 140 # mv qmallgo/ to nested dir qmallgo/qmallgo/ 141 # required because docker instruction "COPY dir ." copies dir/* to . 142 run: mkdir avalanchego_tmp && mv qmallgo avalanchego_tmp && mv avalanchego_tmp qmallgo 143 - run: .github/workflows/run_e2e_tests.sh --parallelism 1 --client-id $KURTOSIS_CLIENT_ID --client-secret $KURTOSIS_CLIENT_SECRET 144 shell: bash 145 env: 146 DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 147 DOCKER_PASS: ${{ secrets.DOCKER_PASS }} 148 KURTOSIS_CLIENT_ID: ${{ secrets.KURTOSIS_CLIENT_ID }} 149 KURTOSIS_CLIENT_SECRET: ${{ secrets.KURTOSIS_CLIENT_SECRET }}