-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PR builders and nightly test runners to Github Actions [API-713] (…
…#462) * Move PR builders and nightly test runners to Github Actions This PR introduces new workflows to run tests on pull requests, pushes, and nightly. With this change, we would run the following. On PRs and pushes: - Run tests with Python [ 2.7, 3.9 ] on [ Ubuntu, Windows ] and upload results to Codecov - Run black to verify code style - Generate documentation to verify its correctness Nightly: - Run tests with Python [ 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9 ] on [ Ubuntu, Windows ] Also, did some cleanups to have a consistent style among the workflow definitions. * upload rc logs * disable installing nose from wheel * revert back to wheel instalation for nosetests * traverse all namespaces in the given directory for nosetests * fix datetime tests for Windows * flush stdout before starting the tests * add missing comma to python version matrix in nightly runner * address review comments
- Loading branch information
Showing
6 changed files
with
187 additions
and
79 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,40 +1,36 @@ | ||
on: | ||
issues: | ||
types: [labeled] | ||
|
||
types: [ labeled ] | ||
name: Create Issue from Label | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event.label.name == 'to-jira' }} | ||
runs-on: ubuntu-latest | ||
name: Create Issue | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Login | ||
uses: atlassian/gajira-login@master | ||
env: | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
|
||
- name: Create | ||
id: create | ||
uses: atlassian/gajira-create@master | ||
with: | ||
project: API | ||
issuetype: Bug | ||
summary: | | ||
${{ github.event.issue.title }} [GH-${{ github.event.issue.number }}] | ||
description: | | ||
*URL:* ${{ github.event.issue.html_url }} | ||
*Created By:* ${{ github.event.issue.user.login }} | ||
${{ github.event.issue.body }} | ||
fields: '{"labels": ["GitHub","Python"]}' | ||
- name: Transition Issue | ||
uses: atlassian/gajira-transition@master | ||
with: | ||
issue: ${{ steps.create.outputs.issue }} | ||
transition: "To Do" | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Login | ||
uses: atlassian/gajira-login@master | ||
env: | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
- name: Create | ||
id: create | ||
uses: atlassian/gajira-create@master | ||
with: | ||
project: API | ||
issuetype: Bug | ||
summary: | | ||
${{ github.event.issue.title }} [GH-${{ github.event.issue.number }}] | ||
description: | | ||
*URL:* ${{ github.event.issue.html_url }} | ||
*Created By:* ${{ github.event.issue.user.login }} | ||
${{ github.event.issue.body }} | ||
fields: '{"labels": ["GitHub","Python"]}' | ||
- name: Transition Issue | ||
uses: atlassian/gajira-transition@master | ||
with: | ||
issue: ${{ steps.create.outputs.issue }} | ||
transition: "To Do" |
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,41 @@ | ||
name: Runs the tests nightly | ||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
jobs: | ||
run-tests: | ||
runs-on: ${{ matrix.os }} | ||
name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [ 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9 ] | ||
os: [ ubuntu-latest, windows-latest ] | ||
fail-fast: false | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '8' | ||
- name: Checkout to code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test.txt | ||
- name: Run tests | ||
env: | ||
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | ||
run: python run_tests.py | ||
- name: Upload remote controller logs on test failure | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: rc-logs-${{ matrix.python-version }}-${{ matrix.os }} | ||
path: | | ||
rc_stderr.log | ||
rc_stdout.log |
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,86 @@ | ||
name: Run tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 4.*.z | ||
pull_request: | ||
branches: | ||
- master | ||
- 4.*.z | ||
jobs: | ||
run-tests: | ||
runs-on: ${{ matrix.os }} | ||
name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [ 2.7, 3.9 ] | ||
os: [ ubuntu-latest, windows-latest ] | ||
fail-fast: false | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '8' | ||
- name: Checkout to code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test.txt | ||
- name: Run tests | ||
env: | ||
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | ||
run: python run_tests.py | ||
- name: Upload remote controller logs on test failure | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: rc-logs-${{ matrix.python-version }}-${{ matrix.os }} | ||
path: | | ||
rc_stderr.log | ||
rc_stdout.log | ||
- name: Publish results to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
files: ./coverage.xml | ||
run-linter: | ||
runs-on: ubuntu-latest | ||
name: Run black to check the code style | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Checkout to code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
- name: Run black | ||
run: | | ||
black --check --config black.toml . | ||
generate_docs: | ||
runs-on: ubuntu-latest | ||
name: Generate documentation | ||
steps: | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Checkout to code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
- name: Generate documentation | ||
working-directory: docs | ||
run: | | ||
make html |
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