Skip to content

Commit 02bf295

Browse files
MonssafToukaldpo
authored andcommitted
Adding files for workflow and for formatting
1 parent 1958ec2 commit 02bf295

File tree

5 files changed

+131
-60
lines changed

5 files changed

+131
-60
lines changed

.JuliaFormatter.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
margin = 100
2+
indent = 2
3+
whitespace_typedefs = true
4+
whitespace_ops_in_indices = true
5+
remove_extra_newlines = true
6+
annotate_untyped_fields_with_any = false
7+
normalize_line_endings = "unix"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags: '*'
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: julia-actions/setup-julia@latest
15+
with:
16+
version: '1'
17+
- name: Install dependencies
18+
run: julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
19+
- name: Build and deploy
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
23+
run: julia --project=docs --color=yes docs/make.jl

.github/workflows/TagBot.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: TagBot
2-
on:
3-
issue_comment:
4-
types:
5-
- created
6-
workflow_dispatch:
7-
jobs:
8-
TagBot:
9-
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: JuliaRegistries/TagBot@v1
13-
with:
14-
token: ${{ secrets.GITHUB_TOKEN }}
15-
ssh: ${{ secrets.DOCUMENTER_KEY }}
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,54 @@
1-
name: CI
2-
on:
3-
push:
4-
branches:
5-
- master
6-
pull_request:
7-
types: [opened, synchronize, reopened]
8-
jobs:
9-
test:
10-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
version:
16-
- '1.3'
17-
- '1'
18-
os:
19-
- ubuntu-latest
20-
- macOS-latest
21-
- windows-latest
22-
arch:
23-
- x64
24-
steps:
25-
- uses: actions/checkout@v2
26-
- uses: julia-actions/setup-julia@v1
27-
with:
28-
version: ${{ matrix.version }}
29-
arch: ${{ matrix.arch }}
30-
- uses: actions/cache@v1
31-
env:
32-
cache-name: cache-artifacts
33-
with:
34-
path: ~/.julia/artifacts
35-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
36-
restore-keys: |
37-
${{ runner.os }}-test-${{ env.cache-name }}-
38-
${{ runner.os }}-test-
39-
${{ runner.os }}-
40-
- uses: julia-actions/julia-buildpkg@v1
41-
- uses: julia-actions/julia-runtest@v1
42-
- uses: julia-actions/julia-processcoverage@v1
43-
- uses: codecov/codecov-action@v1
44-
with:
45-
file: lcov.info
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
jobs:
9+
test:
10+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
11+
runs-on: ${{ matrix.os }}
12+
continue-on-error: ${{ matrix.allow_failure }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version: ['1.3', '1']
17+
os: [ubuntu-latest, macOS-latest, windows-latest]
18+
arch: [x64]
19+
allow_failure: [false]
20+
include:
21+
- version: 'nightly'
22+
os: ubuntu-latest
23+
arch: x64
24+
allow_failure: true
25+
- version: 'nightly'
26+
os: macOS-latest
27+
arch: x64
28+
allow_failure: true
29+
- version: 'nightly'
30+
os: windows-latest
31+
arch: x64
32+
allow_failure: true
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: julia-actions/setup-julia@v1
36+
with:
37+
version: ${{ matrix.version }}
38+
arch: ${{ matrix.arch }}
39+
- uses: actions/cache@v1
40+
env:
41+
cache-name: cache-artifacts
42+
with:
43+
path: ~/.julia/artifacts
44+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
45+
restore-keys: |
46+
${{ runner.os }}-test-${{ env.cache-name }}-
47+
${{ runner.os }}-test-
48+
${{ runner.os }}-
49+
- uses: julia-actions/julia-buildpkg@v1
50+
- uses: julia-actions/julia-runtest@v1
51+
- uses: julia-actions/julia-processcoverage@v1
52+
- uses: codecov/codecov-action@v1
53+
with:
54+
file: lcov.info

.github/workflows/format_pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# https://github.com/julia-actions/julia-format/blob/master/workflows/format_pr.yml
2+
name: format-pr
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Install JuliaFormatter and format
14+
run: |
15+
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
16+
julia -e 'using JuliaFormatter; format(".")'
17+
# https://github.com/marketplace/actions/create-pull-request
18+
# https://github.com/peter-evans/create-pull-request#reference-example
19+
- name: Create Pull Request
20+
id: cpr
21+
uses: peter-evans/create-pull-request@v3
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
commit-message: ":robot: Format .jl files"
25+
title: '[AUTO] JuliaFormatter.jl run'
26+
branch: auto-juliaformatter-pr
27+
delete-branch: true
28+
labels: formatting, automated pr, no changelog
29+
- name: Check outputs
30+
run: |
31+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
32+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)