Skip to content

Commit 116fecf

Browse files
committed
Merge branch '17-add-ci-pipeline-and-status-badges'
2 parents 9cd55b3 + 9149c20 commit 116fecf

9 files changed

Lines changed: 129 additions & 1 deletion

File tree

.codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
status:
8+
project:
9+
default:
10+
target: 80%

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Julia ${{ matrix.version }} - ${{ github.event_name }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version: ['1.11', 'nightly']
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- uses: julia-actions/setup-julia@v1
22+
with:
23+
version: ${{ matrix.version }}
24+
25+
- name: Cache Julia artifacts
26+
uses: actions/cache@v4 # ✅ updated
27+
with:
28+
path: ~/.julia/artifacts
29+
key: ${{ runner.os }}-${{ matrix.version }}-artifacts-${{ hashFiles('**/Project.toml') }}
30+
restore-keys: |
31+
${{ runner.os }}-${{ matrix.version }}-artifacts-
32+
${{ runner.os }}-artifacts-
33+
34+
- uses: julia-actions/julia-buildpkg@v1
35+
- uses: julia-actions/julia-runtest@v1
36+
- uses: julia-actions/julia-processcoverage@v1
37+
- uses: codecov/codecov-action@v4
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
file: lcov.info
41+
fail_ci_if_error: true
42+
verbose: true

.github/workflows/docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or "master" if that’s your default
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Julia
16+
uses: julia-actions/setup-julia@v1
17+
with:
18+
version: '1.11'
19+
20+
- name: Install dependencies
21+
run: julia --project=docs -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
22+
23+
- name: Build and deploy docs
24+
run: julia --project=docs docs/make.jl
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ version = "0.1.0"
55

66
[deps]
77
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
8+
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
89
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
910
Primes = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
1011
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1112
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1213

1314
[compat]
1415
BenchmarkTools = "1.6.0"
16+
Coverage = "1.6.1"
1517
LinearAlgebra = "1.11.0"
1618
Primes = "0.5.7"
1719
Random = "1.11.0"

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
[![CI](https://github.com/vargaconsulting/tiny-crypto/actions/workflows/ci.yml/badge.svg)](https://github.com/vargaconsulting/tiny-crypto/actions/workflows/ci.yml)
2+
[![codecov](https://codecov.io/gh/vargaconsulting/tiny-crypto/branch/main/graph/badge.svg)](https://codecov.io/gh/vargaconsulting/tiny-crypto)
3+
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
4+
[![DOI](https://zenodo.org/badge/950847209.svg)](https://doi.org/10.5281/zenodo.15492419)
5+
[![GitHub release](https://img.shields.io/github/v/release/vargaconsulting/tiny-crypto.svg)](https://github.com/vargaconsulting/tiny-crypto/releases)
6+
[![Documentation](https://img.shields.io/badge/docs-stable-blue)](https://vargaconsulting.github.io/tiny-crypto)
7+
18
# Tiny Crypto – Exploring Cryptography with Small Prime Fields
29

310
**A small-scale cryptography playground using tiny prime fields for easy manual verification.**

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/make.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Documenter, TinyCrypto
2+
push!(LOAD_PATH,"../src/")
3+
4+
makedocs(
5+
sitename = "TinyCrypto.jl",
6+
modules = [TinyCrypto],
7+
pages = [
8+
"Home" => "index.md",
9+
"Utility Functions" => "utils.md",
10+
],
11+
)
12+
13+
deploydocs(
14+
repo = "github.com/vargaconsulting/tiny-crypto.git",
15+
devbranch = "main",
16+
)

examples/dkg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module ExampleDKG
2-
using TinyCrypto,LinearAlgebra,Random
2+
using TinyCrypto, LinearAlgebra, Random
33

44
function mod_inverse(a, p)
55
return powermod(a, p - 2, p)

test/Project.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[project]
2+
name = "TinyCryptoTests"
3+
uuid = "12345678-90ab-cdef-1234-567890abcdef"
4+
5+
[deps]
6+
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
7+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8+
TinyCrypto = "a4b5da31-a86c-473b-96f4-ea8fbe6abb4b"
9+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
11+
12+
[compat]
13+
Coverage = "1.6.1"
14+
LinearAlgebra = "1.11.0"
15+
Random = "1.11.0"
16+
Test = "1.11.0"
17+
18+
[extras]
19+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
20+
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
21+
22+
[targets]
23+
test = ["Test", "Coverage"]

0 commit comments

Comments
 (0)