-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now that GitHub supports nested composite actions: actions/runner#646 (comment)
- Loading branch information
Showing
5 changed files
with
25 additions
and
12 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 @@ | ||
name: Initialize Dependencies | ||
description: Install project dependencies | ||
|
||
inputs: | ||
python-version: | ||
description: Python version to install | ||
required: false | ||
default: "3.10" | ||
|
||
outputs: | ||
python-version: | ||
description: Same as input | ||
value: ${{ inputs.python-version }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- {name: Install Python, uses: actions/setup-python@v2, with: {python-version: "${{ inputs.python-version }}"}} | ||
- {name: Install Poetry, uses: abatilo/[email protected]} | ||
- {name: Cache venv, uses: actions/cache@v2, with: {path: .venv, key: "${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}"}, id: cache} | ||
- {name: Install dependencies, run: make deps, shell: bash, if: "steps.cache.outputs.cache-hit != '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 |
---|---|---|
|
@@ -10,9 +10,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- {name: Check out repository code, uses: actions/checkout@v2, with: {fetch-depth: 0}} | ||
- {name: Install Python, uses: actions/setup-python@v2, with: {python-version: "3.10"}} | ||
- {name: Install Poetry, uses: abatilo/[email protected]} | ||
- {name: Cache venv, uses: actions/cache@v2, with: {path: .venv, key: "${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}"}, id: cache} | ||
- {name: Install dependencies, run: make deps, if: "steps.cache.outputs.cache-hit != 'true'"} | ||
- {name: Initialize dependencies, uses: ./.github/actions/init-deps} | ||
- {name: Run lints, run: make lint} | ||
- {name: Build docs, run: make docs} |
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 |
---|---|---|
|
@@ -13,10 +13,7 @@ jobs: | |
SPHINX_HTML_BASEURL: "https://${{ github.event_name != 'release' && 'rob86stage.' || '' }}robpol86.com/" | ||
steps: | ||
- {name: Check out repository code, uses: actions/checkout@v2, with: {fetch-depth: 0}} | ||
- {name: Install Python, uses: actions/setup-python@v2, with: {python-version: "3.10"}} | ||
- {name: Install Poetry, uses: abatilo/[email protected]} | ||
- {name: Cache venv, uses: actions/cache@v2, with: {path: .venv, key: "${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}"}, id: cache} | ||
- {name: Install dependencies, run: make deps, if: "steps.cache.outputs.cache-hit != 'true'"} | ||
- {name: Initialize dependencies, uses: ./.github/actions/init-deps} | ||
- {name: Build docs, run: make docs} | ||
- {name: Store HTML, uses: actions/upload-artifact@v2, with: {name: html, path: build/html/, if-no-files-found: error}} | ||
|
||
|
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 |
---|---|---|
|
@@ -41,10 +41,7 @@ jobs: | |
SPHINX_HTML_BASEURL: "https://robpol86.com/" | ||
steps: | ||
- {name: Check out repository code, uses: actions/checkout@v2, with: {fetch-depth: 0}} | ||
- {name: Install Python, uses: actions/setup-python@v2, with: {python-version: "3.10"}} | ||
- {name: Install Poetry, uses: abatilo/[email protected]} | ||
- {name: Cache venv, uses: actions/cache@v2, with: {path: .venv, key: "${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }}"}, id: cache} | ||
- {name: Install dependencies, run: make deps, if: "steps.cache.outputs.cache-hit != 'true'"} | ||
- {name: Initialize dependencies, uses: ./.github/actions/init-deps} | ||
- {name: Build docs, run: make docs} | ||
- {name: Prettify, uses: creyD/[email protected], with: {prettier_options: "--write html/**/*.{js,css,html,xml}", prettier_plugins: "@prettier/plugin-xml"}} | ||
- {name: Store HTML, uses: actions/upload-artifact@v2, with: {name: html_wf, path: build/html/, if-no-files-found: error}} | ||
|
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