-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update github.com/coinbase/coinbase-advanced-py
* right/master: (37 commits) Release v1.7.0 (#74) Release v1.6.2 (#70) Release v1.6.1 (#69) Release v1.6.0 (#68) v1.5.0 (#66) Release v1.4.3 (#61) Change API Key JSON Filename in Readme (#58) Release v1.4.2 (#57) Release v1.4.1 (#55) Release v1.4.0 (#53) Update issues.yml (#50) Update Discord Link with Invite (#48) Update support link to Discord (#47) v1.3.0 (#45) Release v1.2.2 (#40) v1.2.1 (#38) v1.2.0 (#35) Release v1.1.3 (#28) v1.1.2 (#25) Release v1.1.1 (#23) ...
- Loading branch information
Showing
4 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
format-code: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies and format code | ||
run: | | ||
sudo apt-get install -y make | ||
pip3 install -r lint_requirements.txt | ||
make format | ||
if git diff --quiet; then | ||
echo "No code formatting changes detected." | ||
else | ||
echo "Code formatting changes detected. Please run 'make format' locally and commit the changes." | ||
git diff --exit-code | ||
exit 1 | ||
fi | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies and run tests | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip3 install --upgrade pip | ||
pip3 install -r requirements.txt | ||
pip3 install -r test_requirements.txt | ||
python -m unittest discover -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our [Advanced API Discord](https://discord.com/channels/1220414409550336183/1220464268743278613) instead (use this [invite link](https://discord.com/invite/cdp) if it\'s your first time accessing the Discord).' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Slack notifications for PRs and Issues | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened] | ||
|
||
env: | ||
CHANNEL_API_FEEDBACK: ${{ vars.CHANNEL_API_FEEDBACK }} | ||
ON_CALL_API: ${{ vars.ON_CALL_API }} | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
skip: ${{ env.skip }} | ||
steps: | ||
- name: Check spam labels | ||
if: ${{ contains(github.event.*.labels.*.name, 'spam') }} | ||
run: | | ||
echo "skip=true" >> $GITHUB_ENV | ||
echo "::error:: Spam label found." | ||
notify: | ||
runs-on: ubuntu-latest | ||
needs: checks | ||
if: ${{ needs.checks.outputs.skip != 'true' }} | ||
steps: | ||
- name: Set channel and mention | ||
run: | | ||
echo "channel=${{ env.CHANNEL_API_FEEDBACK }}" >> $GITHUB_ENV | ||
echo "mention=${{ env.ON_CALL_API }}" >> $GITHUB_ENV | ||
- name: Set text | ||
run: | | ||
text=$(echo "${{ vars.SLACK_TEMPLATE }}") | ||
text=${text//'{{event}}'/Issue ${{ env.action }}} | ||
text=${text//'{{author}}'/${{ env.author }}} | ||
text=${text//'{{url}}'/${{ env.url }}} | ||
text=${text//'{{mention}}'/${{ env.mention }}} | ||
text=${text//'{{repo}}'/${{ github.repository }}} | ||
text="${text//$'\r\n'/'\n'}" | ||
text="${text//$'\n'/'\n'}" | ||
echo "text=$text" >> $GITHUB_ENV | ||
env: | ||
action: ${{ github.event.action }} | ||
author: ${{ github.event.issue.user.login }} | ||
url: ${{ github.event.issue.html_url }} | ||
|
||
- name: Notify Slack | ||
uses: slackapi/slack-github-action@v1.24.0 | ||
with: | ||
payload: | | ||
{ | ||
"channel": "#${{ env.channel }}", | ||
"username": "${{ vars.WEBHOOK_USERNAME }}", | ||
"text": "*${{ env.title }}*\n${{ env.text }}", | ||
"icon_emoji": ":${{ vars.ICON_EMOJI }}:" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
title: ${{ github.event.issue.title }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Github Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["master"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: | | ||
pip3 install -r pinned_requirements.txt | ||
pip3 install -r docs_requirements.txt | ||
- name: Build HTML | ||
run: | | ||
cd docs | ||
make html | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
# Upload the build output directory | ||
path: 'docs/_build/html' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |