Skip to content

Commit 40b4c34

Browse files
committed
Update .github/workflows
1 parent 3bc101b commit 40b4c34

File tree

6 files changed

+141
-4
lines changed

6 files changed

+141
-4
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve Square SDKs
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## **ATTENTION**
11+
This issue template is for **bugs** or **documentation** errors in this SDK Repo. Please direct all technical support questions, feature requests, API-related issues, and general discussions to our Square-supported developer channels. For public support, [join us in our Square Developer Discord server](https://discord.com/invite/squaredev) or [post in our Developer Forums](https://developer.squareup.com/forums). For private support, [contact our Developer Success Engineers](https://squareup.com/help/us/en/contact?panel=BF53A9C8EF68) directly.
12+
13+
**Describe the bug**
14+
A clear and concise description of what the bug is.
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**To Reproduce**
20+
Steps to reproduce the bug:
21+
1. (step 1)
22+
2. (step 2)
23+
3. (step 3)
24+
4. ...
25+
26+
**Screenshots**
27+
If applicable, add screenshots to help explain the bug.
28+
29+
**Square SDK version**
30+
For example: 17.2.x
31+
32+
**Additional context**
33+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Square Developer Forums
4+
url: https://developer.squareup.com/forums
5+
about: Public discussion threads for technical support, feature requests, api discussion, and all things related to square development.
6+
- name: Square Developer Discord Server
7+
url: https://discord.com/invite/squaredev
8+
about: Community slack channel for real time support and conversations about building with square.
9+
- name: Developer Support
10+
url: https://squareup.com/help/us/en/contact?panel=BF53A9C8EF68
11+
about: Private support directly with Square Developer Success Engineers.

.github/labeler.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# configuration settings for labeler
3+
4+
version: v1
5+
6+
labels:
7+
- label: "automerge"
8+
sync: true
9+
matcher:
10+
title: "^Generated PR for Release:"
11+
12+
- label: "automerge-author"
13+
sync: true
14+
matcher:
15+
author:
16+
- square-sdk-deployer
17+
18+
- label: "automerge-branch"
19+
sync: true
20+
matcher:
21+
branch: "^release"

.github/pull_request_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# **ATTENTION**
2+
This repository **cannot** accept Pull Requests. If you wish to proceed with opening this PR, please understand that your code **will not** be pulled into this repository. Consider opening an issue which lays out the problem instead. Thank you very much for your efforts and highlighting issues!
3+
4+
Please direct all technical support questions, feature requests, API-related issues, and general discussions to our Square-supported developer channels. For public support, [join us in our Square Developer Discord server](https://discord.com/invite/squaredev) or [post in our Developer Forums](https://developer.squareup.com/forums). For private support, [contact our Developer Success Engineers](https://squareup.com/help/us/en/contact?panel=BF53A9C8EF68) directly.

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: ci
22

3-
on: [push]
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'legacy/**'
7+
tags:
8+
- '*'
9+
- '!legacy*'
10+
branches:
11+
- '**'
12+
413
jobs:
514
compile:
615
runs-on: ubuntu-latest
@@ -17,9 +26,12 @@ jobs:
1726
- name: Install dependencies
1827
run: poetry install
1928
- name: Compile
20-
run: poetry run mypy .
29+
run: poetry run mypy src
30+
2131
test:
2232
runs-on: ubuntu-latest
33+
env:
34+
TEST_SQUARE_TOKEN: ${{ secrets.TEST_SQUARE_TOKEN }}
2335
steps:
2436
- name: Checkout repo
2537
uses: actions/checkout@v3
@@ -34,10 +46,10 @@ jobs:
3446
run: poetry install
3547

3648
- name: Test
37-
run: poetry run pytest -rP .
49+
run: poetry run pytest -rP tests
3850

3951
publish:
40-
needs: [compile, test]
52+
needs: [compile]
4153
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
4254
runs-on: ubuntu-latest
4355
steps:

.github/workflows/legacy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
paths:
6+
- 'legacy/**'
7+
tags:
8+
- 'legacy*'
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
env:
14+
SQUARE_SANDBOX_TOKEN: ${{ secrets.TEST_SQUARE_TOKEN }}
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
- name: Set up python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: 3.8
22+
- name: Bootstrap poetry
23+
run: |
24+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
25+
- name: Install dependencies
26+
working-directory: ./legacy
27+
run: poetry install
28+
29+
- name: Test
30+
working-directory: ./legacy
31+
run: poetry run pytest -rP tests
32+
33+
publish:
34+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/legacy')
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repo
38+
uses: actions/checkout@v3
39+
- name: Set up python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: 3.8
43+
- name: Bootstrap poetry
44+
run: |
45+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
46+
- name: Install dependencies
47+
working-directory: ./legacy
48+
run: poetry install
49+
- name: Publish to pypi
50+
working-directory: ./legacy
51+
run: |
52+
poetry config repositories.remote https://upload.pypi.org/legacy/
53+
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
54+
env:
55+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
56+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)