forked from pycontribs/jira
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow testing of Jira Cloud (pycontribs#1107)
* initial attempt of a Jira Cloud github action * reusable workflows to enforce Server passing before Cloud * add opt-in marker for running tests on jira cloud `@allow_on_cloud` * fixes to allow Cloud tests to run update error handling in JiraTestManager, remove default flaky * use property access to `is_jira_cloud_ci` * `create_project()` leadAccountId inline * fix bugs in setting defaults for create_project * set default project template for Cloud correctly * `test_group()` `@allow_on_cloud` * update exception handling to use `JIRAError` over Exception where possible * add docstring to `_project_exists()`
- Loading branch information
1 parent
f2a2d49
commit 8d6a171
Showing
8 changed files
with
246 additions
and
148 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,24 @@ | ||
name: Jira CI | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Server: | ||
uses: pycontribs/jira/.github/workflows/jira_server_ci.yml@main | ||
|
||
Cloud: | ||
needs: Server | ||
uses: pycontribs/jira/.github/workflows/jira_cloud_ci.yml@main | ||
secrets: | ||
CLOUD_ADMIN: ${{ secrets.CI_JIRA_CLOUD_ADMIN }} | ||
CLOUD_ADMIN_TOKEN: ${{ secrets.CI_JIRA_CLOUD_ADMIN_TOKEN }} | ||
CLOUD_USER: ${{ secrets.CI_JIRA_CLOUD_USER }} | ||
CLOUD_USER_TOKEN: ${{ secrets.CI_JIRA_CLOUD_USER_TOKEN }} |
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,70 @@ | ||
name: Jira Cloud CI | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CLOUD_ADMIN: | ||
required: true | ||
CLOUD_ADMIN_TOKEN: | ||
required: true | ||
CLOUD_USER: | ||
required: true | ||
CLOUD_USER_TOKEN: | ||
required: true | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
matrix: | ||
os: [Ubuntu] | ||
# We only test a single version to prevent concurrent | ||
# running of tests influencing one another | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Setup the Pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: >- | ||
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{ | ||
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ | ||
hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update; sudo apt-get install gcc libkrb5-dev | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox -e py38 -- -m allow_on_cloud | ||
env: | ||
CI_JIRA_TYPE: CLOUD | ||
CI_JIRA_CLOUD_ADMIN: ${{ secrets.CLOUD_ADMIN }} | ||
CI_JIRA_CLOUD_ADMIN_TOKEN: ${{ secrets.CLOUD_ADMIN_TOKEN }} | ||
CI_JIRA_CLOUD_USER: ${{ secrets.CLOUD_USER }} | ||
CI_JIRA_CLOUD_USER_TOKEN: ${{ secrets.CLOUD_USER_TOKEN }} | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.15 | ||
with: | ||
file: ./coverage.xml | ||
name: ${{ runner.os }}-${{ matrix.python-version }}-Cloud |
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
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
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
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
Oops, something went wrong.