Skip to content

Commit

Permalink
chore: run tests at GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jun 8, 2021
1 parent 42123be commit bbce116
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 316 deletions.
77 changes: 26 additions & 51 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,47 @@
name: Go
on:
push:
tags:
- refs/tags/*
name: Test, build, and release
on: [push, pull_request]
jobs:

build:
name: Build
main:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
- uses: actions/setup-go@v2
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- run: go version
- run: go get github.com/tebeka/go2xunit
- run: go get -u golang.org/x/lint/golint
- run: go mod download
- run: docker-compose up -d
- run: make lint
- run: make test

- name: Build
if: true != startsWith(github.ref, 'refs/tags/')
run: make build-release
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build release
if: startsWith(github.ref, 'refs/tags/')
run: make build-release

- name: Publish release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
files: |
dist/windows.zip
dist/darwin.zip
dist/linux.zip
draft: true
prerelease: false
- name: Upload Release Asset - Windows
id: upload-release-asset-win
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/windows.zip
asset_name: windows.zip
asset_content_type: application/zip
- name: Upload Release Asset - Mac
id: upload-release-asset-darwin
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/darwin.zip
asset_name: darwin.zip
asset_content_type: application/zip
- name: Upload Release Asset - Linux
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/linux.zip
asset_name: linux.zip
asset_content_type: application/zip
2 changes: 0 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ Let's start from the bottom upwards.
# ensure .env has the node/compiler versions you want to test
docker-compose up node compiler
export AETERNITY_ALICE_PRIVATE_KEY=.....
export AETERNITY_BOB_PRIVATE_KEY=.....
go test ./integration_test -count=1 # count is needed because Go caches test results if they were successful.
```
12 changes: 0 additions & 12 deletions Dockerfile.ci

This file was deleted.

52 changes: 0 additions & 52 deletions Jenkinsfile

This file was deleted.

4 changes: 2 additions & 2 deletions build/docker/aeternity_node_mean16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keys:
dir: ./keys

chain:
persist: true
persist: false
hard_forks:
"1": 0
"2": 2
Expand All @@ -37,4 +37,4 @@ mining:
edge_bits: 15
# nice: 3
fork_management:
network_id: "ae_docker"
network_id: "ae_docker"
4 changes: 0 additions & 4 deletions build/docker/sdk.env

This file was deleted.

177 changes: 0 additions & 177 deletions build/docker/wait-for-it.sh

This file was deleted.

13 changes: 0 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
version: '3'
services:
sdk:
build:
context: .
dockerfile: Dockerfile.ci
depends_on: [node]
entrypoint: docker/wait-for-it.sh node:3013 --
env_file: [./build/docker/sdk.env]
environment:
- WALLET_PRIV=${WALLET_PRIV}
- WALLET_PUB=${WALLET_PUB}
volumes:
- .:/go/src/app

node:
image: aeternity/aeternity:${TAG}
hostname: node
Expand Down

0 comments on commit bbce116

Please sign in to comment.