Skip to content

Commit

Permalink
feat: Update github actions to use nix
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed May 17, 2024
1 parent 8b4e559 commit c01e992
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
15 changes: 8 additions & 7 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ type: docker
name: default

steps:
- name: Checks
image: nixos/nix:master
- name: Build & Test
image: rust:latest
commands:
- nix --extra-experimental-features "nix-command flakes" flake check
- nix --extra-experimental-features "nix-command flakes" build .#checks.x86_64-linux.ansi-to-tui-llvm-coverage
- name: upload-codecov
image: robertstettner/drone-codecov
files: result
- cargo build
- cargo test
- name: Bench
image: rust:latest
commands:
- cargo bench
23 changes: 17 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

Expand All @@ -15,8 +14,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix flake check
- run: nix --extra-experimental-features "nix-command flakes" build .#checks.x86_64-linux.ansi-to-tui-llvm-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
flags: unittests
name: codecov-ansi-to-tui
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: ./result
verbose: true
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ use tui::text::Text;
/// IntoText will convert any type that has a AsRef<[u8]> to a Text.
pub trait IntoText {
/// Convert the type to a Text.
#[allow(clippy::wrong_self_convention)]
fn into_text(&self) -> Result<Text<'static>, Error>;
/// Convert the type to a Text while trying to copy as less as possible
#[cfg(feature = "zero-copy")]
Expand Down

0 comments on commit c01e992

Please sign in to comment.