Skip to content

Commit 873f8a8

Browse files
committed
Revert "remove github actions"
This reverts commit 11cd292.
1 parent 53d4c97 commit 873f8a8

File tree

2 files changed

+167
-0
lines changed

2 files changed

+167
-0
lines changed

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### Description
2+
3+
> Include a brief description of the problem being solved and why this
4+
> approach was chosen. Mention risks or shortcomings with this solution.
5+
> Provide relevant background information such as the associated issue, links
6+
> to design documents, screenshots, and performance measurements.
7+
>
8+
> Even small changes deserve a little attention to detail. Put your change in
9+
> context.
10+
11+
Connected to #
12+
13+
### Testing Notes / Validation Steps
14+
15+
> Explain how this change has been tested and what cases/conditions are
16+
> covered. Enumerate the steps someone might take to manually exercise this
17+
> change. Detail is important!
18+
>
19+
> You can recommend one-time manual testing when someone validates your
20+
> changes. Rely on automation when trying to verify that a change remains in
21+
> place. Automated tests should be included in this PR.

.github/workflows/main.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: main
2+
on:
3+
push:
4+
branches: [master]
5+
tags: ['*']
6+
pull_request:
7+
branches: [master]
8+
jobs:
9+
test:
10+
strategy:
11+
matrix:
12+
# TODO: work on windows-latest compatibility?
13+
os: [ubuntu-latest]
14+
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
15+
include:
16+
- os: macos-latest
17+
python-version: '3.9'
18+
runs-on: ${{ matrix.os }}
19+
name: test (py${{ matrix.python-version }} ${{ matrix.os }})
20+
steps:
21+
- uses: actions/checkout@v2
22+
- run: git fetch --prune --unshallow
23+
- uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- run: pip install -r requirements.txt
27+
- run: pip freeze
28+
- if: matrix.python-version > '3.5'
29+
run: make fmt
30+
- if: matrix.python-version >= '3.6'
31+
run: make lint
32+
- run: python setup.py --version
33+
- run: make test-${{ matrix.python-version }}
34+
prerelease-test:
35+
runs-on: ubuntu-latest
36+
continue-on-error: true
37+
steps:
38+
- uses: actions/checkout@v2
39+
- run: git fetch --prune --unshallow
40+
- uses: actions/setup-python@v2
41+
with:
42+
python-version: 3.8.x
43+
- run: pip install --pre -r requirements.txt
44+
- run: pip freeze
45+
- run: make fmt
46+
- run: make lint
47+
- run: python setup.py --version
48+
- run: make mock-test-3.8
49+
distributions:
50+
needs: test
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
- run: git fetch --prune --unshallow
55+
- uses: actions/setup-python@v2
56+
with:
57+
python-version: 3.8.x
58+
- run: pip install -r requirements.txt
59+
- run: pip freeze
60+
- run: make dist
61+
id: create_dist
62+
- uses: actions/upload-artifact@v2
63+
with:
64+
name: distributions
65+
path: dist/
66+
- run: pip install -vvv ${{ steps.create_dist.outputs.whl }}
67+
- run: rsconnect version
68+
- run: rsconnect --help
69+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
70+
id: create_release
71+
uses: actions/create-release@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
tag_name: ${{ github.ref }}
76+
release_name: Release ${{ github.ref }}
77+
draft: false
78+
prerelease: false
79+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
80+
uses: actions/upload-release-asset@v1
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
upload_url: ${{ steps.create_release.outputs.upload_url }}
85+
asset_path: ${{ steps.create_dist.outputs.whl }}
86+
asset_name: ${{ steps.create_dist.outputs.whl_basename }}
87+
asset_content_type: application/x-wheel+zip
88+
- uses: aws-actions/configure-aws-credentials@v1
89+
with:
90+
aws-access-key-id: ${{ secrets.AWS_ID }}
91+
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
92+
aws-region: us-east-1
93+
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
94+
run: make sync-latest-to-s3
95+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
96+
run: make sync-to-s3
97+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
98+
uses: pypa/gh-action-pypi-publish@master
99+
with:
100+
user: __token__
101+
password: ${{ secrets.PYPI_TOKEN }}
102+
docs:
103+
needs: test
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v2
107+
- run: git fetch --prune --unshallow
108+
- uses: actions/setup-python@v2
109+
with:
110+
python-version: 3.8.x
111+
- run: pip install -r requirements.txt
112+
- run: pip freeze
113+
- run: make docs
114+
- uses: actions/upload-artifact@v2
115+
with:
116+
name: docs
117+
path: docs/site/
118+
- uses: aws-actions/configure-aws-credentials@v1
119+
with:
120+
aws-access-key-id: ${{ secrets.AWS_ID }}
121+
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
122+
aws-region: us-east-1
123+
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
124+
run: make sync-latest-docs-to-s3
125+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
126+
uses: aws-actions/configure-aws-credentials@v1
127+
with:
128+
aws-access-key-id: ${{ secrets.DOCS_AWS_ID }}
129+
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET }}
130+
aws-region: us-east-1
131+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
132+
run: make promote-docs-in-s3
133+
dispatch:
134+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
135+
needs: distributions
136+
runs-on: ubuntu-latest
137+
steps:
138+
- uses: actions/github-script@v2
139+
with:
140+
github-token: ${{ secrets.DISPATCH_TOKEN }}
141+
script: |
142+
github.repos.createDispatchEvent({
143+
owner: 'rstudio',
144+
repo: 'rsconnect-jupyter',
145+
event_type: 'rsconnect_python_latest'
146+
})

0 commit comments

Comments
 (0)