Skip to content

Commit

Permalink
Added README and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBloom committed Jan 16, 2024
1 parent 6a89079 commit 18e11e5
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "cargo"
directory: "/frontend/"
schedule:
interval: "weekly"
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Base16 CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
- uses: actions/checkout@v4
- name: Fetch Trunk
uses: jetli/trunk-action@v0.4.0
with:
version: 'latest'
- run: cargo build --verbose --all-features
- run: cargo test --verbose --all-features
- run: cargo doc --verbose
- run: cargo doc --verbose --all-features
23 changes: 23 additions & 0 deletions .github/workflows/cleaniness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Code Cleaniness

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
code_cleaniness_checks:
name: Formatting Checks
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: nightly
components: rustfmt
- uses: actions/checkout@v4
- run: cargo fmt --check
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Webatui Coverage

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: nightly
- name: Fetch Trunk
uses: jetli/trunk-action@v0.4.0
with:
version: 'latest'
- name: Fetch Tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: 'latest'
- name: Generate code coverage
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[![Crates.io](https://img.shields.io/crates/v/base16-palettes.svg)](https://crates.io/crates/base16-palettes)
[![Documentation](https://docs.rs/base16-palettes/badge.svg)](https://docs.rs/base16-palettes/)
![GitHub Workflows](https://github.com/TylerBloom/base16-palettes/actions/workflows/ar_ci.yml/badge.svg)
[![Coverage Status](https://codecov.io/gh/TylerBloom/base16-palettes/branch/main/graph/badge.svg)](https://codecov.io/gh/TylerBloom/base16-palettes)

## About
This is a simple crate that encodes all of the [Base16](https://github.com/chriskempson/base16-schemes-source) palettes into Rust code.
A color is encoded in a universal representation that is then intrepretted into RGB and hex representation through a palette.

## Contributing
The currently supported palettes are those that are in the base16 repo's README.
A few of the listed themes are unavailable.
If you would like to have support added for your favorite missing theme, open an issue or PR.

0 comments on commit 18e11e5

Please sign in to comment.