Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5376d1c

Browse files
committedApr 3, 2021
chore: sync the wip-cst branch with the main branch
Unit tests seem to pass on my machine, fwiw.
1 parent 5ba4a55 commit 5376d1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5696
-1161
lines changed
 

‎.github/dependabot.yml

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

‎.github/workflows/rust.yml

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,78 @@
11
name: Rust
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
7+
codestyle:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Rust
11+
uses: hecrj/setup-rust-action@v1
12+
with:
13+
components: rustfmt
14+
# Note that `nightly` is required for `license_template_path`, as
15+
# it's an unstable feature.
16+
rust-version: nightly
17+
- uses: actions/checkout@v2
18+
- run: cargo +nightly fmt -- --check --config-path <(echo 'license_template_path = "HEADER"')
19+
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Set up Rust
24+
uses: hecrj/setup-rust-action@v1
25+
with:
26+
components: clippy
27+
- uses: actions/checkout@v2
28+
- run: cargo clippy --all-targets --all-features -- -D warnings
29+
30+
compile:
731
runs-on: ubuntu-latest
32+
steps:
33+
- name: Set up Rust
34+
uses: hecrj/setup-rust-action@v1
35+
- uses: actions/checkout@master
36+
- run: cargo check --all-targets --all-features
837

38+
test:
39+
strategy:
40+
matrix:
41+
rust: [stable, beta, nightly]
42+
runs-on: ubuntu-latest
943
steps:
10-
- uses: actions/checkout@v1
1144
- name: Setup Rust
12-
run: |
13-
rustup toolchain install nightly --profile default
14-
rustup toolchain install stable
15-
rustup override set stable
16-
# Clippy must be run first, as its lints are only triggered during
17-
# compilation. Put another way: after a successful `cargo build`, `cargo
18-
# clippy` is guaranteed to produce no results. This bug is known upstream:
19-
# https://github.com/rust-lang/rust-clippy/issues/2604.
20-
# - name: Clippy
21-
# run: cargo clippy -- --all-targets --all-features -- -D warnings
22-
- name: Check formatting
23-
run: |
24-
cargo +nightly fmt -- --check --config-path <(echo 'license_template_path = "HEADER"')
25-
- name: Build
26-
run: cargo build --verbose
27-
- name: Run tests
28-
run: cargo test --verbose
29-
- name: Run tests for all features
30-
run: cargo test --verbose -- all-features
45+
uses: hecrj/setup-rust-action@v1
46+
with:
47+
rust-version: ${{ matrix.rust }}
48+
- name: Install Tarpaulin
49+
uses: actions-rs/install@v0.1
50+
with:
51+
crate: cargo-tarpaulin
52+
version: 0.14.2
53+
use-tool-cache: true
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
- name: Test
57+
run: cargo test --all-features
58+
- name: Coverage
59+
if: matrix.rust == 'stable'
60+
run: cargo tarpaulin -o Lcov --output-dir ./coverage
61+
- name: Coveralls
62+
if: matrix.rust == 'stable'
63+
uses: coverallsapp/github-action@master
64+
with:
65+
github-token: ${{ secrets.GITHUB_TOKEN }}
66+
67+
publish-crate:
68+
if: startsWith(github.ref, 'refs/tags/v0')
69+
runs-on: ubuntu-latest
70+
needs: [test]
71+
steps:
72+
- name: Set up Rust
73+
uses: hecrj/setup-rust-action@v1
74+
- uses: actions/checkout@v2
75+
- name: Publish
76+
shell: bash
77+
run: |
78+
cargo publish --token ${{ secrets.CRATES_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.