Skip to content

Commit d53cddf

Browse files
authored
Merge pull request #241 from sikepuri-algorithm/update-ci-scripts
Update CI scripts
2 parents d94f431 + f7013b9 commit d53cddf

11 files changed

Lines changed: 31 additions & 119 deletions

File tree

.github/actions/build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
runs:
33
using: "Composite"
44
steps:
5-
- name: Install Node Mudules
6-
uses: ./.github/actions/install_node_modules
5+
- name: Install npm Modules
6+
uses: ./.github/actions/install-npm-modules
77

88
- name: Build
99
run: npm run build

.github/actions/execute_notebooks/action.yml renamed to .github/actions/execute-notebooks/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ runs:
33
using: "Composite"
44
steps:
55
- name: Install Python Modules
6-
uses: ./.github/actions/install_python_modules
6+
uses: ./.github/actions/install-python-modules
77

88
- name: Execute Notebooks
99
run: npm run execute_notebooks
File renamed without changes.
File renamed without changes.

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and Deploy
33

44
on:
55
push:
6-
branches: main
6+
branches: [main, master]
77

88
permissions:
99
contents: write
@@ -18,12 +18,12 @@ jobs:
1818
uses: actions/checkout@v3
1919

2020
- name: Execute Notebooks
21-
uses: ./.github/actions/execute_notebooks
21+
uses: ./.github/actions/execute-notebooks
2222

2323
- name: Build
2424
uses: ./.github/actions/build
2525

26-
- name: Deploy 🚀
26+
- name: Deploy
2727
uses: JamesIves/github-pages-deploy-action@v4
2828
with:
2929
clean-exclude: pr-preview/

.github/workflows/formatter.yml

Lines changed: 17 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -22,114 +22,50 @@ jobs:
2222
python-files:
2323
- '**.py,**.pyi,**.ipynb'
2424
25-
databooks:
26-
name: Databooks
25+
formatter:
26+
name: Formatter
2727
needs: changes
28-
if: needs.changes.outputs.python-files == 'true'
2928
runs-on: ubuntu-latest
3029
steps:
3130
- name: Checkout Code
3231
uses: actions/checkout@v3
3332

34-
- name: Install Python Modules
35-
uses: ./.github/actions/install_python_modules
36-
37-
- name: Run Databooks
38-
run: poetry run databooks meta --no-rm-outs --rm-exec --yes .
39-
40-
prettier:
41-
name: Prettier
42-
runs-on: ubuntu-latest
43-
steps:
44-
- name: Checkout Code
45-
uses: actions/checkout@v3
33+
- name: Install npm Modules
34+
uses: ./.github/actions/install-npm-modules
4635

47-
- name: Install Node Mudules
48-
uses: ./.github/actions/install_node_modules
36+
- name: Install Python Modules
37+
uses: ./.github/actions/install-python-modules
4938

5039
- name: Run Prettier
5140
run: npx prettier --write .
5241

53-
black:
54-
name: Black
55-
needs: databooks
56-
if: needs.changes.outputs.python-files == 'true'
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Checkout Code
60-
uses: actions/checkout@v3
61-
62-
- name: Install Python Modules
63-
uses: ./.github/actions/install_python_modules
64-
65-
- name: Run Black
66-
run: poetry run black .
67-
68-
nbqa-isort:
69-
name: nqQA-isort
70-
needs: black
71-
if: needs.changes.outputs.python-files == 'true'
72-
runs-on: ubuntu-latest
73-
steps:
74-
- name: Checkout Code
75-
uses: actions/checkout@v3
76-
77-
- name: Install Python Modules
78-
uses: ./.github/actions/install_python_modules
42+
- name: Run Databooks
43+
if: needs.changes.outputs.python-files == 'true'
44+
run: poetry run databooks meta --rm-outs --rm-exec --yes .
7945

8046
- name: Run nqQA isort
47+
if: needs.changes.outputs.python-files == 'true'
8148
run: poetry run nbqa isort .
8249

83-
nbqa-pyupgrade:
84-
name: nqQA-pyupgrade
85-
needs: black
86-
if: needs.changes.outputs.python-files == 'true'
87-
runs-on: ubuntu-latest
88-
steps:
89-
- name: Checkout Code
90-
uses: actions/checkout@v3
91-
92-
- name: Install Python Modules
93-
uses: ./.github/actions/install_python_modules
94-
9550
- name: Run nqQA pyupgrade
51+
if: needs.changes.outputs.python-files == 'true'
9652
run: poetry run nbqa pyupgrade .
9753

98-
pre-commit:
99-
name: pre-commit
100-
needs: black
101-
runs-on: ubuntu-latest
102-
steps:
103-
- name: Checkout Code
104-
uses: actions/checkout@v3
105-
106-
- name: Setup Python
107-
uses: actions/setup-python@v4
108-
with:
109-
python-version: latest
110-
111-
- name: Install Python Modules
112-
uses: ./.github/actions/install_python_modules
54+
- name: Run Black
55+
if: needs.changes.outputs.python-files == 'true'
56+
run: poetry run black .
11357

11458
- name: Cache pre-commit
11559
uses: actions/cache@v3
116-
id: pre-commit_cache_id
60+
id: precommit_cache_id
11761
with:
11862
path: ~/.cache/pre-commit
11963
key: pre-commit-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('.pre-commit-config.yaml') }}
12064

121-
- name: Install pre-commit environment
122-
if: steps.pre-commit_cache_id.outputs.cache-hit != 'true'
123-
run: pre-commit run --all-files
124-
12565
- name: Run pre-commit
126-
run: pre-commit run --all-files
66+
if: steps.precommit_cache_id.outputs.cache-hit != 'true'
67+
run: poetry run pre-commit run --all-files
12768

128-
commit:
129-
name: Commit
130-
needs: prettier
131-
runs-on: ubuntu-latest
132-
steps:
13369
- name: Commit
13470
uses: stefanzweifel/git-auto-commit-action@v4
13571
with:

.github/workflows/linter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
with:
3636
ref: ${{ github.head_ref }}
3737

38-
- name: Install Node Mudules
39-
uses: ./.github/actions/install_node_modules
38+
- name: Install npm Modules
39+
uses: ./.github/actions/install-npm-modules
4040

4141
- name: Run ESLint
4242
run: npx eslint . --ext .js,.jsx,.ts,.tsx
@@ -52,8 +52,8 @@ jobs:
5252
with:
5353
ref: ${{ github.head_ref }}
5454

55-
- name: Install Node Mudules
56-
uses: ./.github/actions/install_node_modules
55+
- name: Install npm Modules
56+
uses: ./.github/actions/install-npm-modules
5757

5858
- name: Run Stylelint
5959
run: npx stylelint "**/*.css"

.github/workflows/notebook-execution-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
uses: actions/checkout@v3
1515

1616
- name: Execute Notebooks
17-
uses: ./.github/actions/execute_notebooks
17+
uses: ./.github/actions/execute-notebooks

.github/workflows/preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Deploy PR previews
2+
name: Deploy PR Previews
33

44
on:
55
pull_request:
@@ -15,7 +15,7 @@ concurrency: preview-${{ github.ref }}
1515

1616
jobs:
1717
deploy-preview:
18-
name: Deploy PR previews
18+
name: Deploy PR Previews
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout Code

.github/workflows/super_linter.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)