-
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.
Refactoring CI workflow with proper caching
add build/ to gitignore GITHUB_TOKEN not required when running locally try use the new aiida-core image Use reusable actions and refact CI workflow use pyproject.toml cache pip install comment CI only for plugins.yaml action preview based on test-webpage-build
- Loading branch information
Showing
14 changed files
with
265 additions
and
263 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,18 @@ | ||
--- | ||
name: Build environment | ||
description: Create build environment | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set Up Python 🐍 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
|
||
- name: Install Dev Dependencies 📦 | ||
run: | | ||
pip install -U pip | ||
pip install -U -e .[dev] | ||
shell: bash |
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,49 @@ | ||
--- | ||
name: Build environment | ||
description: Create build environment | ||
|
||
inputs: | ||
gh_token: | ||
description: GitHub token | ||
required: true | ||
type: string | ||
cache: | ||
description: use caching or not | ||
required: true | ||
type: boolean | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Restore cached Plugins | ||
id: cache-plugins-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: plugins_metadata.json | ||
key: plugins_metadata | ||
|
||
- name: fetch metadata | ||
if: ${{ inputs.cache == 'false' }} | ||
id: fetch_metadata | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.gh_token }} | ||
run: aiida-registry fetch | ||
shell: bash | ||
- name: Check plugins installation | ||
if: ${{ inputs.cache == 'false' }} | ||
# This step will attach plugin installation inforamtion to the metadata, e.g. if the plugin can be installed or not | ||
run: aiida-registry test-install | ||
shell: bash | ||
- name: Cache plugins metadata | ||
if: ${{ inputs.cache == 'false' }} | ||
id: cache-plugins-save | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: plugins_metadata.json | ||
key: ${{ steps.cache-plugins-restore.outputs.cache-primary-key }} | ||
|
||
- name: Move JSON file to the React project | ||
run: | | ||
cp plugins_metadata.json aiida-registry-app/src/ | ||
cp plugins_metadata.json aiida-registry-app/dist/ | ||
shell: bash |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.