diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index f1d33b7..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [achannarasappa] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ac7d5fb..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Start with options '...' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Environment (please complete the following information):** - - OS: [e.g. Mac, Windows, Linux] - - Terminal: [e.g. iTerm, ConEmu, Guake] - - Terminal Version: [e.g. 22] - - Font: (Optional) [e.g. Powerline] - - ticker Version: [e.g. v2.2.0] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index c4ea721..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -**Problem Statement** -Is your feature request related to a problem? Please describe. -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Proposed Solution** -A clear and concise description of what you want to happen. - -**Alternatives** -A clear and concise description of any alternative solutions or features you've considered. - -**Use Cases** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..54e4bba --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,61 @@ +name: CI + +permissions: + contents: write + +on: + push: + tags: + - "v*" + +jobs: + publish: + name: Deploying ${{ matrix.build_target }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + build_target: [macos, linux32, linux64] + include: + - build_target: macos + os: macos-latest + artifact_suffix: macos-x86_64 + target_os: darwin + target_arch: amd64 + cflags: "-mmacosx-version-min=10.11" + ldflags: "-mmacosx-version-min=10.11" + - build_target: linux32 + os: ubuntu-latest + artifact_suffix: linux-x86_32 + target_arch: 386 + target_os: linux + - build_target: linux64 + os: ubuntu-latest + artifact_suffix: linux-x86_64 + target_arch: amd64 + target_os: linux + steps: + - name: Set up access + uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + - name: Set up Linux deps + if: matrix.os == 'ubuntu-latest' + run: sudo apt update + - name: Set up Linux32 deps + if: matrix.target_arch == '386' + run: | + sudo apt update + sudo apt-get install gcc-multilib + - name: Build + run: go build -o ticker-${{ matrix.artifact_suffix }} + - name: Package + shell: bash + run: | + ls -la + tar czvf ticker-${{ matrix.artifact_suffix }}.tar.gz ticker-${{ matrix.artifact_suffix }} + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ticker-${{ matrix.artifact_suffix }}.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/close-stale-issue.yaml b/.github/workflows/close-stale-issue.yaml deleted file mode 100644 index 5819d1a..0000000 --- a/.github/workflows/close-stale-issue.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'github-close-stale' -on: - schedule: - - cron: '30 1 * * *' - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.' - stale-pr-message: 'This pr is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.' - close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.' - close-pr-message: 'This pr was closed because it has been stalled for 14 days with no activity.' - days-before-stale: 120 - days-before-close: 30 - exempt-issue-milestones: 'future-release' - exempt-pr-milestones: 'future-release' \ No newline at end of file diff --git a/.github/workflows/lint-commit.yml b/.github/workflows/lint-commit.yml deleted file mode 100644 index 860022c..0000000 --- a/.github/workflows/lint-commit.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: lint-commit-message -on: [push] - -jobs: - commitlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v2 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4b9dd83..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: lint -on: [push, pull_request] - -jobs: - lint: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0a0576f..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: release - -on: - push: - tags: - - '*' - -jobs: - release: - runs-on: ubuntu-latest - env: - DOCKER_CLI_EXPERIMENTAL: "enabled" - steps: - - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Docker Login - uses: docker/login-action@v1 - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.DOCKER_HUB_PAT }} - - name: Snapcraft Login - uses: samuelmeuli/action-snapcraft@v1 - with: - snapcraft_token: ${{ secrets.SNAPCRAFT_PAT }} - - - name: Install upx - run: sudo apt-get install upx -y - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: 1.5.0 - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GH_PAT }} \ No newline at end of file diff --git a/.github/workflows/test-contract.yml b/.github/workflows/test-contract.yml deleted file mode 100644 index d32271e..0000000 --- a/.github/workflows/test-contract.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: test-contract - -on: - schedule: - - cron: '0 8 * * *' - -jobs: - test: - strategy: - matrix: - go-version: [1.17.x] - platform: [ubuntu-latest] - runs-on: ${{ matrix.platform }} - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Install Ginkgo - run: go get -u github.com/onsi/ginkgo/ginkgo@v1.16.4 - - name: Test - run: ginkgo -cover -focus="GetQuotes Response" ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a428fbe..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: test -on: [push, pull_request] - -jobs: - test: - strategy: - matrix: - go-version: [1.17.x] - platform: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.platform }} - env: - TERM: xterm-256color - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 - - name: Install Ginkgo - run: go get -u github.com/onsi/ginkgo/ginkgo@v1.16.4 - - name: Test - run: ginkgo -skip="GetQuotes Response" -cover ./... - coverage: - runs-on: ubuntu-latest - steps: - - name: Install Go - if: success() - uses: actions/setup-go@v2 - with: - go-version: 1.17.x - - name: Checkout code - uses: actions/checkout@v2 - - name: Install Ginkgo - run: go get -u github.com/onsi/ginkgo/ginkgo@v1.16.4 - - name: Calc coverage - run: | - ginkgo -skip="GetQuotes Response" -cover -outputdir=./ -coverprofile=coverage.out ./... - - name: Convert coverage.out to coverage.lcov - uses: jandelgado/gcov2lcov-action@v1.0.6 - - name: Coveralls - uses: coverallsapp/github-action@v1.1.2 - with: - github-token: ${{ secrets.github_token }} - path-to-lcov: coverage.lcov \ No newline at end of file