-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from nicolasauler/local-env
feat: upgrading htmx, picocss, rust deps and rust version, flake lock
- Loading branch information
Showing
25 changed files
with
560 additions
and
1,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,25 @@ | |
# See: https://circleci.com/docs/configuration-reference | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/configuration-reference/#jobs | ||
jobs: | ||
build-and-test: | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
environment: | ||
# Fail the build if there are warnings | ||
RUSTFLAGS: '-D warnings' | ||
RUSTFLAGS: "-D warnings" | ||
CARGO_INCREMENTAL: 0 | ||
# RUSTC_WRAPPER: "sccache" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; rustup --version | ||
# If you have committed your Cargo.lock file to version control | ||
# delete this step. | ||
- run: | ||
name: Calculate dependencies | ||
command: cargo generate-lockfile | ||
- restore_cache: | ||
keys: | ||
- v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
|
@@ -35,12 +35,18 @@ jobs: | |
- target/debug/deps | ||
key: v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} | ||
- run: | ||
name: Run all tests | ||
command: cargo test | ||
name: Install nextest | ||
command: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
- run: | ||
name: Build and archive tests | ||
command: cargo nextest archive --workspace --archive-file nextest-archive.tar.zst | ||
- run: | ||
name: Run tests | ||
command: cargo nextest run --no-fail-fast --archive-file nextest-archive.tar.zst | ||
|
||
security: | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
steps: | ||
- checkout | ||
- run: | ||
|
@@ -66,7 +72,7 @@ jobs: | |
|
||
format: | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
steps: | ||
- checkout | ||
- run: | ||
|
@@ -83,7 +89,7 @@ jobs: | |
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/configuration-reference/#executor-job | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/configuration-reference/#steps | ||
steps: | ||
|
@@ -96,13 +102,13 @@ jobs: | |
command: rustup component add clippy | ||
- run: | ||
name: Linting | ||
command: cargo clippy -- -D warnings | ||
command: cargo clippy --locked --all-targets -- -D warnings -D dead-code | ||
|
||
doc: | ||
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/configuration-reference/#executor-job | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/configuration-reference/#steps | ||
steps: | ||
|
@@ -121,7 +127,7 @@ jobs: | |
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/configuration-reference/#executor-job | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/configuration-reference/#steps | ||
steps: | ||
|
@@ -138,16 +144,19 @@ jobs: | |
- run: | ||
name: Install codecov tool | ||
command: cargo install cargo-llvm-cov | ||
- run: | ||
name: Install nextest | ||
command: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
- run: | ||
name: Running code coverage | ||
command: rustup run nightly cargo llvm-cov --locked --all-features --lcov --output-path lcov.info | ||
command: rustup run nightly cargo llvm-cov nextest --locked --all-features --lcov --output-path lcov.info | ||
- codecov/upload: | ||
file: './lcov.info' | ||
file: "./lcov.info" | ||
#token: $CODECOV_TOKEN already default | ||
|
||
shuttle-deploy: | ||
docker: | ||
- image: cimg/rust:1.78.0 | ||
- image: cimg/rust:1.79.0 | ||
steps: | ||
- checkout | ||
- run: | ||
|
@@ -163,7 +172,6 @@ jobs: | |
name: Deploy to Shuttle | ||
command: cargo shuttle deploy | ||
|
||
|
||
# Orchestrate jobs using workflows | ||
# See: https://circleci.com/docs/configuration-reference/#workflows | ||
workflows: | ||
|
@@ -194,16 +202,19 @@ workflows: | |
filters: | ||
branches: | ||
only: main | ||
# - coverage: | ||
# requires: | ||
# - doc | ||
# filters: | ||
# tags: | ||
# only: /.*/ | ||
- coverage: | ||
requires: | ||
- build-and-test | ||
- security | ||
- format | ||
- lint | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- shuttle-deploy: | ||
requires: | ||
- doc | ||
# - coverage | ||
- coverage | ||
filters: | ||
branches: | ||
only: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[profile.default] | ||
# Print out output for failing tests as soon as they fail, and also at the end | ||
# of the run (for easy scrollability). | ||
failure-output = "immediate-final" | ||
# Do not cancel the test run on the first failure. | ||
fail-fast = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ref: https://docs.codecov.com/docs/codecovyml-reference | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
patch: | ||
default: | ||
informational: true | ||
|
||
# Test files aren't important for coverage | ||
ignore: | ||
- "tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: detect-private-key | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: detect-private-key | ||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.23.1 | ||
hooks: | ||
- id: typos | ||
- repo: local | ||
hooks: | ||
- id: rust-formatting | ||
name: Rust formatting | ||
description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand. | ||
entry: cargo fmt --all -- | ||
pass_filenames: true | ||
types: [file, rust] | ||
language: system | ||
- id: rust-clippy | ||
name: Rust clippy | ||
description: Run cargo clippy on files included in the commit. clippy should be installed before-hand. | ||
entry: cargo clippy --all -- -D warnings | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system | ||
- id: rust-formatting | ||
name: Rust formatting | ||
description: Run cargo fmt on files included in the commit. rustfmt should be installed before-hand. | ||
entry: cargo fmt --all -- | ||
pass_filenames: true | ||
types: [file, rust] | ||
language: system | ||
- id: rust-clippy | ||
name: Rust clippy | ||
description: Run cargo clippy on files included in the commit. clippy should be installed before-hand. | ||
entry: cargo clippy --all -- -D warnings -D dead-code | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system |
Oops, something went wrong.