-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from datejada/1-fix-files-format
Fix files format
- Loading branch information
Showing
13 changed files
with
364 additions
and
360 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
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,52 +1,52 @@ | ||
name: Copier Update | ||
|
||
on: | ||
schedule: | ||
- cron: 0 7 1/7 * * | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 7 1/7 * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Copier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.COPIER_PAT }} | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- name: Use Julia cache | ||
uses: julia-actions/cache@v1 | ||
- name: Install JuliaFormatter.jl | ||
run: julia -e 'using Pkg; pkg"add JuliaFormatter"' | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Check for update in the template | ||
run: | | ||
pip install copier | ||
copier update -A -o rej | ||
echo -e "Automated changed by Copier.yml workflow\n" > /tmp/body.md | ||
echo -e 'Rejected changes (if any):\n```diff\n' >> /tmp/body.md | ||
find . -name "*.rej" | xargs cat >> /tmp/body.md | ||
find . -name "*.rej" | xargs rm -f | ||
echo -e '```' >> /tmp/body.md | ||
git diff | ||
- name: Run pre-commit to run the formatters | ||
run: | | ||
pip install pre-commit | ||
pre-commit run -a || true # Ignore pre-commit errors | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.COPIER_PAT }} | ||
commit-message: ":robot: COPIERTemplate.jl update" | ||
title: "[AUTO] COPIERTemplate.jl update" | ||
body-path: /tmp/body.md | ||
branch: auto-copier-template-update | ||
delete-branch: true | ||
labels: configuration, automated pr, no changelog | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | ||
Copier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.COPIER_PAT }} | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- name: Use Julia cache | ||
uses: julia-actions/cache@v1 | ||
- name: Install JuliaFormatter.jl | ||
run: julia -e 'using Pkg; pkg"add JuliaFormatter"' | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Check for update in the template | ||
run: | | ||
pip install copier | ||
copier update -A -o rej | ||
echo -e "Automated changed by Copier.yml workflow\n" > /tmp/body.md | ||
echo -e 'Rejected changes (if any):\n```diff\n' >> /tmp/body.md | ||
find . -name "*.rej" | xargs cat >> /tmp/body.md | ||
find . -name "*.rej" | xargs rm -f | ||
echo -e '```' >> /tmp/body.md | ||
git diff | ||
- name: Run pre-commit to run the formatters | ||
run: | | ||
pip install pre-commit | ||
pre-commit run -a || true # Ignore pre-commit errors | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.COPIER_PAT }} | ||
commit-message: ":robot: COPIERTemplate.jl update" | ||
title: "[AUTO] COPIERTemplate.jl update" | ||
body-path: /tmp/body.md | ||
branch: auto-copier-template-update | ||
delete-branch: true | ||
labels: configuration, automated pr, no changelog | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
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,51 +1,51 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- "src/**" | ||
- "*.toml" | ||
tags: ["*"] | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- "src/**" | ||
- "*.toml" | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- "src/**" | ||
- "*.toml" | ||
tags: ["*"] | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "docs/**" | ||
- "src/**" | ||
- "*.toml" | ||
types: [opened, synchronize, reopened] | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- run: | | ||
julia --project=docs -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate()' | ||
- run: | | ||
julia --project=docs -e ' | ||
using Documenter: DocMeta, doctest | ||
using TulipaProfileFitting | ||
DocMeta.setdocmeta!(TulipaProfileFitting, :DocTestSetup, :(using TulipaProfileFitting); recursive=true) | ||
doctest(TulipaProfileFitting)' | ||
- run: julia --project=docs docs/make.jl | ||
env: | ||
JULIA_PKG_SERVER: "" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- run: | | ||
julia --project=docs -e ' | ||
using Pkg | ||
Pkg.develop(PackageSpec(path=pwd())) | ||
Pkg.instantiate()' | ||
- run: | | ||
julia --project=docs -e ' | ||
using Documenter: DocMeta, doctest | ||
using TulipaProfileFitting | ||
DocMeta.setdocmeta!(TulipaProfileFitting, :DocTestSetup, :(using TulipaProfileFitting); recursive=true) | ||
doctest(TulipaProfileFitting)' | ||
- run: julia --project=docs docs/make.jl | ||
env: | ||
JULIA_PKG_SERVER: "" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
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,37 +1,37 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: ["*"] | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: ["*"] | ||
pull_request: | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
permissions: | ||
contents: read | ||
jobs: | ||
lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v3 | ||
- name: Setup Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- name: Use Julia cache | ||
uses: julia-actions/cache@v1 | ||
- name: Install JuliaFormatter.jl | ||
run: julia -e 'using Pkg; pkg"add JuliaFormatter"' | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit | ||
run: SKIP=no-commit-to-branch pre-commit run -a | ||
lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v3 | ||
- name: Setup Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: "1" | ||
- name: Use Julia cache | ||
uses: julia-actions/cache@v1 | ||
- name: Install JuliaFormatter.jl | ||
run: julia -e 'using Pkg; pkg"add JuliaFormatter"' | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit | ||
run: SKIP=no-commit-to-branch pre-commit run -a |
Oops, something went wrong.