Skip to content

Commit dbe5430

Browse files
committed
Init
0 parents  commit dbe5430

File tree

14 files changed

+770
-0
lines changed

14 files changed

+770
-0
lines changed

.clippy.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Project configuration for Clippy Rust code linter.
2+
# See full lints list at:
3+
# https://rust-lang.github.io/rust-clippy/master/index.html
4+
5+
standard-macro-braces = [
6+
{ name = "assert", brace = "(" },
7+
{ name = "assert_eq", brace = "(" },
8+
{ name = "assert_ne", brace = "(" },
9+
{ name = "vec", brace = "[" },
10+
]

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
max_line_length = 80
9+
10+
[*.md]
11+
indent_style = space
12+
indent_size = 4
13+
trim_trailing_whitespace = false
14+
max_line_length = off
15+
16+
[*.rs]
17+
indent_style = space
18+
indent_size = 4
19+
20+
[*.toml]
21+
indent_style = space
22+
indent_size = 4
23+
24+
[*.{yaml,yml}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[Makefile]
29+
indent_style = tab
30+
indent_size = 4

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: daily

.github/workflows/audit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Security audit
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
tags: ["v*"]
7+
paths: ["**/Cargo.toml"]
8+
pull_request:
9+
branches: ["main"]
10+
paths: ["**/Cargo.toml"]
11+
schedule:
12+
- cron: "7 7 * * *"
13+
14+
jobs:
15+
cargo-audit:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: stable
23+
- uses: actions-rs/audit-check@v1
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: ["main"]
9+
10+
env:
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
15+
##########################
16+
# Linting and formatting #
17+
##########################
18+
19+
clippy:
20+
if: ${{ github.ref == 'refs/heads/main'
21+
|| startsWith(github.ref, 'refs/tags/v')
22+
|| !contains(github.event.head_commit.message, '[skip ci]') }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions-rs/toolchain@v1
27+
with:
28+
profile: minimal
29+
toolchain: stable
30+
components: clippy
31+
32+
- run: make cargo.lint
33+
34+
rustfmt:
35+
if: ${{ github.ref == 'refs/heads/main'
36+
|| startsWith(github.ref, 'refs/tags/v')
37+
|| !contains(github.event.head_commit.message, '[skip ci]') }}
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- uses: actions-rs/toolchain@v1
42+
with:
43+
profile: minimal
44+
toolchain: nightly
45+
components: rustfmt
46+
47+
- run: make cargo.fmt check=yes
48+
49+
50+
51+
52+
###########
53+
# Testing #
54+
###########
55+
56+
msrv:
57+
name: MSRV
58+
if: ${{ github.ref == 'refs/heads/main'
59+
|| startsWith(github.ref, 'refs/tags/v')
60+
|| !contains(github.event.head_commit.message, '[skip ci]') }}
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
msrv: ['1.56.0']
65+
os:
66+
- ubuntu
67+
- macOS
68+
- windows
69+
runs-on: ${{ matrix.os }}-latest
70+
steps:
71+
- uses: actions/checkout@v2
72+
- uses: actions-rs/toolchain@v1
73+
with:
74+
profile: minimal
75+
toolchain: nightly
76+
- uses: actions-rs/toolchain@v1
77+
with:
78+
profile: minimal
79+
toolchain: ${{ matrix.msrv }}
80+
override: true
81+
82+
- run: cargo +nightly update -Z minimal-versions
83+
84+
- run: make test.cargo
85+
86+
test:
87+
if: ${{ github.ref == 'refs/heads/main'
88+
|| startsWith(github.ref, 'refs/tags/v')
89+
|| !contains(github.event.head_commit.message, '[skip ci]') }}
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
os:
94+
- ubuntu
95+
- macOS
96+
- windows
97+
toolchain:
98+
- stable
99+
- beta
100+
- nightly
101+
runs-on: ${{ matrix.os }}-latest
102+
steps:
103+
- uses: actions/checkout@v2
104+
- uses: actions-rs/toolchain@v1
105+
with:
106+
profile: minimal
107+
toolchain: ${{ matrix.toolchain }}
108+
override: true
109+
110+
- run: make test.cargo
111+
112+
113+
114+
115+
#################
116+
# Documentation #
117+
#################
118+
119+
rustdoc:
120+
if: ${{ github.ref == 'refs/heads/main'
121+
|| startsWith(github.ref, 'refs/tags/v')
122+
|| !contains(github.event.head_commit.message, '[skip ci]') }}
123+
runs-on: ubuntu-latest
124+
steps:
125+
- uses: actions/checkout@v2
126+
- uses: actions-rs/toolchain@v1
127+
with:
128+
profile: minimal
129+
toolchain: stable
130+
131+
- run: make cargo.doc private=yes open=no
132+
133+
134+
135+
136+
#############
137+
# Releasing #
138+
#############
139+
140+
release-github:
141+
name: Release on GitHub
142+
needs:
143+
- clippy
144+
- msrv
145+
- rustdoc
146+
- rustfmt
147+
- test
148+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
149+
runs-on: ubuntu-latest
150+
steps:
151+
- uses: actions/checkout@v2
152+
153+
- name: Parse release version
154+
id: release
155+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
156+
157+
- name: Verify release version matches Cargo manifest
158+
run: >-
159+
test "${{ steps.release.outputs.VERSION }}" \
160+
== "$(grep -m1 'version = "' Cargo.toml | cut -d '"' -f2)"
161+
162+
- name: Parse CHANGELOG link
163+
id: changelog
164+
run: echo ::set-output
165+
name=LINK::https://github.com/${{ github.repository }}/blob/v${{ steps.release.outputs.VERSION }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.release.outputs.VERSION }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)
166+
167+
- uses: softprops/action-gh-release@v1
168+
env:
169+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
with:
171+
name: ${{ steps.release.outputs.VERSION }}
172+
body: |
173+
[API docs](https://docs.rs/cucumber-expressions/${{ steps.release.outputs.VERSION }})
174+
[Changelog](${{ steps.changelog.outputs.LINK }})
175+
prerelease: ${{ contains(steps.release.outputs.VERSION, '-') }}
176+
177+
release-crate:
178+
name: Release on crates.io
179+
needs: ["release-github"]
180+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
181+
runs-on: ubuntu-latest
182+
steps:
183+
- uses: actions/checkout@v2
184+
- uses: actions-rs/toolchain@v1
185+
with:
186+
profile: minimal
187+
toolchain: stable
188+
189+
- name: Publish crate
190+
run: cargo publish --token ${{ secrets.CRATESIO_TOKEN }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.idea/
2+
/.vscode/
3+
/*.iml
4+
.DS_Store
5+
6+
/target/
7+
/Cargo.lock
8+
**/*.rs.bk

.rustfmt.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Project configuration for rustfmt Rust code formatter.
2+
# See full list of configurations at:
3+
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md
4+
5+
max_width = 80
6+
format_strings = false
7+
imports_granularity = "Crate"
8+
9+
format_code_in_doc_comments = true
10+
format_macro_matchers = true
11+
use_try_shorthand = true
12+
13+
error_on_line_overflow = true
14+
error_on_unformatted = true
15+
16+
unstable_features = true

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
`cucumber-expressions` changelog
2+
================================
3+
4+
All user visible changes to `cucumber-expressions` crate will be documented in this file. This project uses [Semantic Versioning 2.0.0].
5+
6+
7+
8+
9+
## [0.1.0] · 2021-??-??
10+
[0.1.0]: /../../tree/v0.1.0
11+
12+
### Added
13+
14+
- ???
15+
16+
17+
18+
19+
[Semantic Versioning 2.0.0]: https://semver.org

Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "cucumber-expressions"
3+
version = "0.1.0-dev"
4+
edition = "2021"
5+
rust-version = "1.56"
6+
license = "MIT OR Apache-2.0"
7+
authors = [
8+
"Ilya Solovyiov <ilya.solovyiov@gmail.com>",
9+
"Kai Ren <tyranron@gmail.com>",
10+
]
11+
documentation = "https://docs.rs/cucumber-expressions"
12+
homepage = "https://github.com/cucumber-rs/cucumber-expressions"
13+
repository = "https://github.com/cucumber-rs/cucumber-expressions"
14+
readme = "README.md"
15+
categories = ["compilers", "parser-implementations"]
16+
keywords = ["cucumber", "expression", "expressions", "cucumber-expressions"]
17+
include = ["/src/", "/LICENSE-*", "/README.md", "/CHANGELOG.md"]
18+
19+
[dependencies]

0 commit comments

Comments
 (0)