Skip to content

Commit 49baa27

Browse files
committed
Setup tests
1 parent de186be commit 49baa27

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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 }}

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
jobs:
8+
test:
9+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- version: '1.10'
16+
os: ubuntu-latest
17+
arch: x64
18+
- version: '1'
19+
os: ubuntu-latest
20+
arch: x64
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: julia-actions/setup-julia@v2
24+
with:
25+
version: ${{ matrix.version }}
26+
arch: ${{ matrix.arch }}
27+
- uses: julia-actions/cache@v1
28+
- uses: julia-actions/julia-buildpkg@v1
29+
- uses: julia-actions/julia-runtest@v1
30+
with:
31+
depwarn: error
32+
- uses: julia-actions/julia-processcoverage@v1
33+
- uses: codecov/codecov-action@v4
34+
with:
35+
file: lcov.info
36+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/format_check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: format-check
2+
on:
3+
push:
4+
branches:
5+
- maain
6+
- release-*
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: julia-actions/setup-julia@latest
14+
with:
15+
version: '1'
16+
- uses: actions/checkout@v4
17+
- name: Format check
18+
shell: julia --color=yes {0}
19+
run: |
20+
using Pkg
21+
Pkg.add(PackageSpec(name="JuliaFormatter", version="2"))
22+
using JuliaFormatter
23+
format(".", verbose=true)
24+
out = String(read(Cmd(`git diff`)))
25+
if isempty(out)
26+
exit(0)
27+
end
28+
@error "Some files have not been formatted !!!"
29+
write(stdout, out)
30+
exit(1)

test/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[deps]
2+
ArrayAD = "c45fa1ca-6901-44ac-ae5b-5513a4852d50"
3+
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
4+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include("ReverseAD.jl")

0 commit comments

Comments
 (0)