-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 11cd292.
- Loading branch information
Showing
2 changed files
with
167 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,21 @@ | ||
### Description | ||
|
||
> Include a brief description of the problem being solved and why this | ||
> approach was chosen. Mention risks or shortcomings with this solution. | ||
> Provide relevant background information such as the associated issue, links | ||
> to design documents, screenshots, and performance measurements. | ||
> | ||
> Even small changes deserve a little attention to detail. Put your change in | ||
> context. | ||
Connected to # | ||
|
||
### Testing Notes / Validation Steps | ||
|
||
> Explain how this change has been tested and what cases/conditions are | ||
> covered. Enumerate the steps someone might take to manually exercise this | ||
> change. Detail is important! | ||
> | ||
> You can recommend one-time manual testing when someone validates your | ||
> changes. Rely on automation when trying to verify that a change remains in | ||
> place. Automated tests should be included in this PR. |
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,146 @@ | ||
name: main | ||
on: | ||
push: | ||
branches: [master] | ||
tags: ['*'] | ||
pull_request: | ||
branches: [master] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
# TODO: work on windows-latest compatibility? | ||
os: [ubuntu-latest] | ||
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10'] | ||
include: | ||
- os: macos-latest | ||
python-version: '3.9' | ||
runs-on: ${{ matrix.os }} | ||
name: test (py${{ matrix.python-version }} ${{ matrix.os }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install -r requirements.txt | ||
- run: pip freeze | ||
- if: matrix.python-version > '3.5' | ||
run: make fmt | ||
- if: matrix.python-version >= '3.6' | ||
run: make lint | ||
- run: python setup.py --version | ||
- run: make test-${{ matrix.python-version }} | ||
prerelease-test: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.x | ||
- run: pip install --pre -r requirements.txt | ||
- run: pip freeze | ||
- run: make fmt | ||
- run: make lint | ||
- run: python setup.py --version | ||
- run: make mock-test-3.8 | ||
distributions: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.x | ||
- run: pip install -r requirements.txt | ||
- run: pip freeze | ||
- run: make dist | ||
id: create_dist | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: distributions | ||
path: dist/ | ||
- run: pip install -vvv ${{ steps.create_dist.outputs.whl }} | ||
- run: rsconnect version | ||
- run: rsconnect --help | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.create_dist.outputs.whl }} | ||
asset_name: ${{ steps.create_dist.outputs.whl_basename }} | ||
asset_content_type: application/x-wheel+zip | ||
- uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET }} | ||
aws-region: us-east-1 | ||
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: make sync-latest-to-s3 | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
run: make sync-to-s3 | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
docs: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8.x | ||
- run: pip install -r requirements.txt | ||
- run: pip freeze | ||
- run: make docs | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: docs | ||
path: docs/site/ | ||
- uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET }} | ||
aws-region: us-east-1 | ||
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
run: make sync-latest-docs-to-s3 | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.DOCS_AWS_ID }} | ||
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET }} | ||
aws-region: us-east-1 | ||
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
run: make promote-docs-in-s3 | ||
dispatch: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: distributions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v2 | ||
with: | ||
github-token: ${{ secrets.DISPATCH_TOKEN }} | ||
script: | | ||
github.repos.createDispatchEvent({ | ||
owner: 'rstudio', | ||
repo: 'rsconnect-jupyter', | ||
event_type: 'rsconnect_python_latest' | ||
}) |