From 62feafb6bde41559033605ddd096c75f5fcb131b Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 20 Apr 2020 12:30:06 +0200 Subject: [PATCH] ci: transition some ci to github actions ## Description move tests for abci_cli, abci_app and app_tests to github actions ______ For contributor use: - [ ] Wrote tests - [ ] Updated CHANGELOG_PENDING.md - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Updated relevant documentation (`docs/`) and code comments - [ ] Re-reviewed `Files changed` in the Github PR explorer --- .circleci/config.yml | 29 ------------- .github/workflows/lint.yaml | 2 +- .github/workflows/tests.yml | 82 +++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/tests.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 3cd01136b..5ba99e41c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,26 +73,6 @@ jobs: paths: - "." - test_abci_apps: - executor: golang - steps: - - run_test: - script_path: abci/tests/test_app/test.sh - - # if this test fails, fix it and update the docs at: - # https://github.com/tendermint/tendermint/blob/master/docs/abci-cli.md - test_abci_cli: - executor: golang - steps: - - run_test: - script_path: abci/tests/test_cli/test.sh - - test_apps: - executor: golang - steps: - - run_test: - script_path: test/app/test.sh - test_persistence: executor: golang steps: @@ -390,15 +370,6 @@ workflows: only: - docs-staging - setup_dependencies - - test_abci_apps: - requires: - - setup_dependencies - - test_abci_cli: - requires: - - setup_dependencies - - test_apps: - requires: - - setup_dependencies - test_cover: requires: - setup_dependencies diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index ad499d9af..de3126982 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -9,4 +9,4 @@ jobs: uses: reviewdog/action-golangci-lint@v1 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-check + reporter: github-pr-review diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..75ca8b4a0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,82 @@ +name: Tests +on: + pull_request: + push: + branches: + - master + - release/** + +jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2-beta + - name: Set GOBIN + run: | + echo "::add-path::$(go env GOPATH)/bin" + - uses: actions/checkout@v2 + - name: install + run: make install install_abci + # Cache bin + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-tm-binary + + test_abci_apps: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v2-beta + - name: Set GOBIN + run: | + echo "::add-path::$(go env GOPATH)/bin" + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-tm-binary + - name: test_abci_apps + run: abci/tests/test_app/test.sh + shell: bash + + test_abci_cli: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v2-beta + - name: Set GOBIN + run: | + echo "::add-path::$(go env GOPATH)/bin" + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-tm-binary + - run: abci/tests/test_cli/test.sh + shell: bash + + test_apps: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v2-beta + - name: Set GOBIN + run: | + echo "::add-path::$(go env GOPATH)/bin" + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-tm-binary + - name: test_apps + run: test/app/test.sh + shell: bash