Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate GitHub Actions workflows
- Loading branch information
1 parent
496cfb8
commit 2b4271d
Showing
9 changed files
with
86 additions
and
91 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 |
---|---|---|
@@ -1,93 +1,9 @@ | ||
jobs: | ||
complete_coveralls: | ||
needs: test-multi-python | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true | ||
lint-multi-os: | ||
name: Lint ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/cache@v1 | ||
with: | ||
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }} | ||
path: ~/.cache/pip | ||
restore-keys: | | ||
v0-${{ runner.os }}-pip-lint- | ||
v0-${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
# Pin pip to 21.x for now to avoid error in pre-commit action on Win | ||
python -m pip install --upgrade pip==21.* setuptools wheel | ||
pip install .[lint] | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/action@v2.0.3 | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest, windows-latest] | ||
test-multi-os: | ||
name: Test ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/cache@v1 | ||
with: | ||
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }} | ||
path: ~/.cache/pip | ||
restore-keys: | | ||
v0-${{ runner.os }}-pip-test- | ||
v0-${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[test] | ||
- name: Test with pytest | ||
run: pytest | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest, windows-latest] | ||
test-multi-python: | ||
name: Test Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/cache@v1 | ||
with: | ||
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }} | ||
path: ~/.cache/pip | ||
restore-keys: | | ||
v0-${{ runner.os }}-pip-test- | ||
v0-${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[test] | ||
pip install .[ci] | ||
- name: Test with pytest | ||
run: coverage run --source prawcore --module pytest | ||
- env: | ||
COVERALLS_PARALLEL: true | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
name: Submit to coveralls | ||
run: coveralls --service=github | ||
- name: Check coverage | ||
run: coverage report -m --fail-under=100 | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, '3.10'] | ||
ci: | ||
name: CI | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/ci.yml@main | ||
with: | ||
package: prawcore | ||
name: CI | ||
on: [pull_request, push] | ||
on: [ pull_request, push ] |
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,13 @@ | ||
jobs: | ||
manual_tag_release: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/manual_tag_release.yml@main | ||
with: | ||
commit: ${{ inputs.commit }} | ||
name: Manual Tag Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit: | ||
description: The commit the version bump occurred | ||
required: true |
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,9 @@ | ||
jobs: | ||
pre-commit_autoupdate: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/pre-commit_autoupdate.yml@main | ||
name: Update pre-commit hooks | ||
on: | ||
schedule: | ||
- cron: 0 15 * * 1 | ||
workflow_dispatch: |
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,13 @@ | ||
jobs: | ||
prepare_release: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/prepare_release.yml@main | ||
with: | ||
commit: ${{ inputs.version }} | ||
name: Prepare Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: The version to prepare for release | ||
required: true |
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,8 @@ | ||
jobs: | ||
pypi: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/pypi.yml@main | ||
name: Upload Python Package | ||
on: | ||
release: | ||
types: [ published ] |
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,11 @@ | ||
jobs: | ||
scorecards-analysis: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/scorecards-analysis.yml@main | ||
name: Scorecards supply-chain security | ||
on: | ||
branch_protection_rule: | ||
push: | ||
branches: [ master ] | ||
schedule: | ||
- cron: 30 1 * * 6 |
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,8 @@ | ||
jobs: | ||
set_active_docs: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/set_active_docs.yml@main | ||
name: Set Active Docs | ||
on: | ||
release: | ||
types: [ published ] |
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,9 @@ | ||
jobs: | ||
stale_action: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/stale_action.yml@main | ||
name: Close stale issues and PRs | ||
on: | ||
schedule: | ||
- cron: 0 */6 * * * | ||
workflow_dispatch: |
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,8 @@ | ||
jobs: | ||
tag_release: | ||
secrets: inherit | ||
uses: praw-dev/.github/.github/workflows/tag_release.yml@main | ||
name: Tag Release | ||
on: | ||
push: | ||
branches: [ master, release_test ] |