Skip to content

Commit 67ba5dc

Browse files
authored
Merge branch 'main' into feat/security
2 parents ef81a95 + 1b44edf commit 67ba5dc

File tree

11 files changed

+79
-172
lines changed

11 files changed

+79
-172
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,37 @@
1-
name: CI
1+
name: "Continuous integration"
22
on:
33
push:
4-
branches:
5-
- main
64
pull_request:
7-
branches:
8-
- main
5+
96
jobs:
10-
build:
11-
name: Build
7+
ci:
8+
name: CI checks
129
runs-on: ubuntu-latest
1310
strategy:
1411
matrix:
1512
rust:
1613
- stable
1714
- beta
18-
- nightly
19-
- 1.45.0
2015
steps:
21-
- name: Check out code
22-
uses: actions/checkout@v2
23-
- name: Install Rust toolchain
24-
uses: actions-rs/toolchain@v1
25-
with:
26-
toolchain: ${{ matrix.rust }}
27-
profile: minimal
28-
components: clippy
29-
override: true
30-
- name: Cache Rust dependencies
31-
uses: Swatinem/rust-cache@v1
32-
- name: Install cargo-make
33-
uses: actions-rs/cargo@v1
34-
with:
35-
command: install
36-
args: cargo-make
37-
- name: Build
38-
if: ${{ matrix.rust != 'stable' }}
39-
uses: actions-rs/cargo@v1
40-
with:
41-
command: make
42-
args: ci-build
43-
- name: Build and lint
16+
- uses: actions/checkout@v4
17+
- uses: actions-rust-lang/setup-rust-toolchain@v1
4418
if: ${{ matrix.rust == 'stable' }}
45-
uses: actions-rs/cargo@v1
46-
with:
47-
command: make
48-
args: ci-lint
49-
format:
50-
name: Format
51-
runs-on: ubuntu-latest
52-
steps:
53-
- name: Check out code
54-
uses: actions/checkout@v2
55-
- name: Install Rust toolchain
56-
uses: actions-rs/toolchain@v1
57-
with:
58-
toolchain: stable
59-
profile: minimal
60-
components: rustfmt
61-
override: true
62-
- name: Cache Rust dependencies
63-
uses: Swatinem/rust-cache@v1
64-
- name: Install cargo-make
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: install
68-
args: cargo-make
69-
- name: Check format
70-
uses: actions-rs/cargo@v1
7119
with:
72-
command: make
73-
args: ci-format
74-
test:
75-
name: Test
76-
runs-on: ubuntu-latest
77-
strategy:
78-
matrix:
79-
rust:
80-
- stable
81-
- beta
82-
- nightly
83-
- 1.45.0
84-
steps:
85-
- name: Check out code
86-
uses: actions/checkout@v2
87-
- name: Install Rust toolchain
88-
uses: actions-rs/toolchain@v1
20+
toolchain: "1.61.0" # TODO: Pull this from Cargo.toml?
21+
- uses: actions-rust-lang/setup-rust-toolchain@v1
8922
with:
23+
components: clippy, rustfmt
9024
toolchain: ${{ matrix.rust }}
91-
profile: minimal
92-
components: ""
93-
override: true
94-
- name: Cache Rust dependencies
95-
uses: Swatinem/rust-cache@v1
96-
- name: Install cargo-make
97-
uses: actions-rs/cargo@v1
98-
with:
99-
command: install
100-
args: cargo-make
101-
- name: Run tests and generate coverage report
102-
uses: actions-rs/cargo@v1
25+
- uses: taiki-e/install-action@v2
10326
with:
104-
command: make
105-
args: ci-test
106-
- name: Upload to codecov.io
27+
tool: cargo-msrv,cargo-tarpaulin
28+
- run: ./scripts/ci/format
29+
- run: ./scripts/ci/check
30+
- run: ./scripts/ci/test
31+
- run: cargo msrv verify
32+
if: ${{ matrix.rust == 'stable' }}
33+
- uses: coverallsapp/github-action@v2
10734
if: ${{ matrix.rust == 'stable' }}
108-
uses: codecov/codecov-action@v1
10935
with:
110-
fail_ci_if_error: true
111-
36+
file: lcov.info
37+
format: lcov

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ target
22
Cargo.lock
33

44
# Backups from `cargo fmt`
5-
*.rs.bk
5+
*.rs.bk
6+
7+
# Coverage report
8+
lcov.*
9+
*.lcov
10+
*.profraw

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
[package]
22
name = "preferences"
3-
version = "3.0.0"
3+
version = "2.0.1-dev.0"
44
authors = ["Andy Barron <[email protected]>"]
55
edition = "2021"
6-
rust-version = "1.61.0"
6+
rust-version = "1.61.0" # syn
77

88
description = "Read and write user-specific application data (in stable Rust)"
99
documentation = "https://docs.rs/preferences"
1010
repository = "https://github.com/AndyBarron/preferences-rs"
1111
readme = "README.md"
1212
keywords = ["preferences", "user", "data", "persistent", "storage"]
13+
categories = ["config"]
1314
license = "MIT-0"
1415

1516
[features]

LICENSE.txt

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
The MIT License (MIT)
1+
MIT No Attribution
22

3-
Copyright (c) 2016 Andy Barron
3+
Copyright 2024 Andy Barron
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
6+
software and associated documentation files (the "Software"), to deal in the Software
7+
without restriction, including without limitation the rights to use, copy, modify,
8+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9+
permit persons to whom the Software is furnished to do so.
1110

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile.toml

Lines changed: 0 additions & 42 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# preferences
22
_Read and write user-specific application data in Rust_
33

4-
[![crates.io: preferences](https://img.shields.io/crates/v/preferences.svg?label=crates.io%3A%20preferences)](https://crates.io/crates/preferences)
5-
[![Linux & OS X build status](https://img.shields.io/travis/AndyBarron/preferences-rs.svg?label=Linux%20%26%20OS%20X%20builds)](https://travis-ci.org/AndyBarron/preferences-rs)
6-
[![Windows build status](https://img.shields.io/appveyor/ci/AndyBarron/preferences-rs.svg?label=Windows%20builds)](https://ci.appveyor.com/project/AndyBarron/preferences-rs)
4+
[![Crates.io Version](https://img.shields.io/crates/v/preferences)](https://crates.io/crates/preferences)
5+
![Crates.io MSRV](https://img.shields.io/crates/msrv/preferences)
6+
[![Crates.io License](https://img.shields.io/crates/l/preferences)](https://github.com/andybarron/preferences-rs/blob/main/LICENSE.txt)
7+
![Crates.io Total Downloads](https://img.shields.io/crates/d/preferences)
8+
9+
[![docs.rs](https://img.shields.io/docsrs/preferences)](https://docs.rs/preferences)
10+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/andybarron/preferences-rs/ci.yaml)](https://github.com/andybarron/preferences-rs/actions/workflows/ci.yaml)
11+
[![Coveralls](https://img.shields.io/coverallsCoverage/github/andybarron/preferences-rs)](https://coveralls.io/github/andybarron/preferences-rs)
712

813
## Documentation
914
https://docs.rs/preferences
1015

1116
## Installation
12-
Add the following to your `Cargo.toml`:
13-
14-
`preferences = "^1.1.0"`
17+
```sh
18+
cargo add preferences
19+
```

scripts/ci/check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
cargo clippy --all-targets -- -Dwarnings

scripts/ci/format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
cargo fmt -- --check --verbose

scripts/ci/test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
cargo tarpaulin -v --all-features --ignore-tests --out Lcov

scripts/release

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
cargo release "$@"

0 commit comments

Comments
 (0)