Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
joaosreis committed Jan 16, 2024
2 parents 987559e + ae92cd6 commit 36c4153
Show file tree
Hide file tree
Showing 71 changed files with 7,721 additions and 3,222 deletions.
103 changes: 0 additions & 103 deletions .circleci/config.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.
<!-- Add a clear and concise description of what the bug is. -->

**To Reproduce**
Steps to reproduce the behavior:
<!-- Steps to reproduce the behavior: -->

**Expected behavior**
A clear and concise description of what you expected to happen.
<!-- Add a clear and concise description of what you expected to happen. -->

**Additional context**
<!-- You can include any relevant stack traces or debugging output in this section. -->
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ assignees: ''
---

**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 [...]
<!-- Describe what the problem is. For example, “I'm always frustrated when [...]”. -->

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
<!-- Describe what you want to happen. -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
<!-- Describe any alternative solutions or features you've considered. -->

**Additional context**
Add any other context or screenshots about the feature request here.
<!-- Add any other context or screenshots about the feature request in this section. -->

80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- master
pull_request:

env:
go_version: 1.16
GO111MODULE: on
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}

jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- run: make build
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- run: make test
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 3m

Check-License:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
version: latest
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- run: make check-license

Check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
version: latest
- run: make check-format

Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
version: latest
- uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- run: make test-cover COVERALLS_TOKEN="$COVERALLS_TOKEN"

# Salus:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# version: latest
# - run: make salus

95 changes: 65 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,87 @@

## Code of Conduct

All interactions with this project follow our [Code of Conduct][code-of-conduct].
By participating, you are expected to honor this code. Violators can be banned
from further participation in this project, or potentially all Coinbase projects.
All interactions with this project follow our [Code of Conduct](https://github.com/coinbase/code-of-conduct). By participating, you are expected to honor this code. Violators can be banned from further participation in this project, or potentially all Coinbase projects.

[code-of-conduct]: https://github.com/coinbase/code-of-conduct
## How to Contribute

## Bug Reports
You can contribute to this repository by asking questions, providing feedback, and reporting issues.

* Ensure your issue [has not already been reported][1]. It may already be fixed!
* Include the steps you carried out to produce the problem.
* Include the behavior you observed along with the behavior you expected, and
why you expected it.
* Include any relevant stack traces or debugging output.
### Asking Questions

## Feature Requests
Submit your questions via the [Rosetta Community boards][13].

We welcome feedback with or without pull requests. If you have an idea for how
to improve the project, great! All we ask is that you take the time to write a
clear and concise explanation of what need you are trying to solve. If you have
thoughts on _how_ it can be solved, include those too!
### Providing Feedback

You can also use the [Rosetta Community boards][13] to provide feedback.

### Reporting Issues

You can report issues by submitting bug reports, feature requests, or pull requests via GitHub. You **must** submit [security issues](#security-issues) and [support requests](#support-requests) through the links provided.

#### Bug Reports

Before filing a bug report, ensure that your issue [has not already been reported][1]. It may already be fixed!

If your bug hasn’t been fixed, follow these steps to file a bug report:

1. [Open an issue in GitHub][10].
2. Add a title for your bug report. It should briefly describe the problem.
3. Follow the template that appears in the Write text box. This is the best way to describe the bug.
4. Click _Submit new issue_ to finish filing the bug report.

#### Feature Requests

We welcome feedback with or without pull requests. If you have an idea for how to improve the project, great! All we ask is that you take the time to write a clear and concise explanation of the need you are trying to solve. If you have thoughts on _how_ it can be solved, include those too!

To submit a feature request, follow these steps:

1. [Open an issue in GitHub][10].
2. Add a title for your feature request. It should briefly describe your requested feature.
3. Follow the template that appears in the Write text box. This is the best way to explain your request. Be clear and concise in your responses.
4. Click _Submit new issue_ to submit the feature request.

The best way to see a feature added, however, is to submit a pull request.

## Pull Requests
#### Pull Requests

Before creating your pull request, it's usually worth asking whether the code you're planning on writing will be considered for merging. You can do this by [opening an issue][1] and asking. It may also help give the maintainers context for when the time comes to review your code.

* Before creating your pull request, it's usually worth asking if the code
you're planning on writing will actually be considered for merging. You can
do this by [opening an issue][1] and asking. It may also help give the
maintainers context for when the time comes to review your code.
Ensure that your [commit messages are well-written][2]. This can double as your pull request message, so it pays to take the time to write a clear message.

* Ensure your [commit messages are well-written][2]. This can double as your
pull request message, so it pays to take the time to write a clear message.
Additionally, make sure that you have written unit tests for your changes. If you're unsure as to what to test, don't hesitate to [open an issue][1] and ask!

* Add tests for your feature. You should be able to look at other tests for
examples. If you're unsure, don't hesitate to [open an issue][1] and ask!
To submit your pull request, follow these steps:

* Submit your pull request!
1. Follow these instructions on how to [open a pull request in GitHub][11].
2. Click _Create pull request_ to submit your pull request.

## Support Requests
Once you submit your pull request, a reviewer will revise it, and either approve it or offer suggestions.

For security reasons, any communication referencing support tickets for Coinbase
products will be ignored. The request will have its content redacted and will
be locked to prevent further discussion.
#### Security Issues

You can send a report through Coinbase's [H1 program][12]. Check out the [Security][14] tab for more information.

#### Support Requests

All support requests must be made via [our support team][3].

**For security reasons, any communication referencing support tickets for Coinbase products will be ignored.** The request will have its content redacted and will be locked to prevent further discussion.

© 2022 Coinbase

<!-- Before adding link 15, populate link 4. One you do that, please erase this note. --->
[1]: https://github.com/coinbase/rosetta-cli/issues
[2]: https://medium.com/brigade-engineering/the-secrets-to-great-commit-messages-106fc0a92a25
[2]: https://chris.beams.io/posts/git-commit/#seven-rules
[3]: https://support.coinbase.com/customer/en/portal/articles/2288496-how-can-i-contact-coinbase-support-
<!--- [4]: link removed --->
[5]: https://github.com/coinbase/rosetta-cli/issues/new/choose
[6]: https://github.com/coinbase/rosetta-cli/issues/new?assignees=&labels=bug&template=bug_report.md&title=
[7]: https://github.com/coinbase/rosetta-cli/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=
[8]: https://github.com/coinbase/rosetta-cli/pulls
[9]: https://github.com/coinbase/rosetta-cli/compare
[10]: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request#creating-an-issue
[11]: https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request#creating-a-pull-request
[12]: https://hackerone.com/coinbase
[13]: https://community.rosetta-api.org
[14]: https://github.com/coinbase/rosetta-cli/security
50 changes: 50 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2020 Coinbase, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Compile golang
FROM ubuntu:20.04 as cli

RUN apt-get update && apt-get install -y curl make gcc g++ git
ENV GOLANG_VERSION 1.17.9
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 9dacf782028fdfc79120576c872dee488b81257b1c48e9032d122cfdb379cca6

RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

WORKDIR /go/src

ARG VERSION=v0.10.3
RUN git clone https://github.com/coinbase/rosetta-cli.git && \
cd rosetta-cli && \
git fetch --all --tags && \
git checkout $VERSION && \
make install

FROM ubuntu:20.04

RUN apt-get update -y && apt-get install -y \
curl

# Copy all the binaries
COPY --from=cli /go/bin/ /usr/local/bin/

WORKDIR /app
ENTRYPOINT ["rosetta-cli"]
Loading

0 comments on commit 36c4153

Please sign in to comment.