Skip to content

Commit 1bccbcd

Browse files
authored
update Testing files (#6)
* update Testing files * remove formatting check
1 parent e350cc2 commit 1bccbcd

File tree

8 files changed

+114
-101
lines changed

8 files changed

+114
-101
lines changed

.formatting/.gitkeep

Whitespace-only changes.

.formatting/Project.toml

-2
This file was deleted.

.formatting/format_all.jl

-12
This file was deleted.

.github/workflows/CI.yml

-71
This file was deleted.

.github/workflows/ReusableTest.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Reusable test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
required: false
8+
type: string
9+
default: "1"
10+
os:
11+
required: false
12+
type: string
13+
default: ubuntu-latest
14+
arch:
15+
required: false
16+
type: string
17+
default: x64
18+
allow_failure:
19+
required: false
20+
type: boolean
21+
default: false
22+
run_codecov:
23+
required: false
24+
type: boolean
25+
default: false
26+
secrets:
27+
codecov_token:
28+
required: true
29+
30+
jobs:
31+
test:
32+
name: Julia ${{ inputs.version }} - ${{ inputs.os }} - ${{ inputs.arch }} - ${{ github.event_name }}
33+
runs-on: ${{ inputs.os }}
34+
continue-on-error: ${{ inputs.allow_failure }}
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: julia-actions/setup-julia@v2
39+
with:
40+
version: ${{ inputs.version }}
41+
arch: ${{ inputs.arch }}
42+
- name: Use Julia cache
43+
uses: julia-actions/cache@v2
44+
- uses: julia-actions/julia-buildpkg@v1
45+
- uses: julia-actions/julia-runtest@v1
46+
- uses: julia-actions/julia-processcoverage@v1
47+
if: ${{ inputs.run_codecov }}
48+
- uses: codecov/codecov-action@v4
49+
if: ${{ inputs.run_codecov }}
50+
with:
51+
file: lcov.info
52+
token: ${{ secrets.codecov_token }}

.github/workflows/Test.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: ["*"]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
uses: ./.github/workflows/ReusableTest.yml
13+
with:
14+
os: ${{ matrix.os }}
15+
version: ${{ matrix.version }}
16+
arch: ${{ matrix.arch }}
17+
allow_failure: ${{ matrix.allow_failure }}
18+
run_codecov: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }}
19+
secrets:
20+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
version:
25+
- "1.7"
26+
- "1"
27+
os:
28+
- ubuntu-latest
29+
- macOS-latest
30+
- windows-latest
31+
arch:
32+
- x64
33+
allow_failure: [false]

.github/workflows/TestOnPRs.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test on PRs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "src/**"
9+
- "test/**"
10+
- "*.toml"
11+
types: [opened, synchronize, reopened]
12+
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
test:
21+
uses: ./.github/workflows/ReusableTest.yml
22+
with:
23+
os: ubuntu-latest
24+
version: "1"
25+
arch: x64
26+
allow_failure: false
27+
run_codecov: true
28+
secrets:
29+
codecov_token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/formatter.yaml

-16
This file was deleted.

0 commit comments

Comments
 (0)