Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- uses: Swatinem/rust-cache@v2

Expand All @@ -37,10 +35,7 @@ jobs:
tool: protoc

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all
run: cargo test --all-features --all

coverage:
name: Coverage
Expand All @@ -54,10 +49,9 @@ jobs:
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
override: true
components: llvm-tools-preview

- uses: Swatinem/rust-cache@v2
Expand All @@ -74,10 +68,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run xtask coverage
uses: actions-rs/cargo@v1
with:
command: xtask
args: coverage
run: cargo xtask coverage

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
Expand All @@ -94,11 +85,9 @@ jobs:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
Expand All @@ -109,13 +98,7 @@ jobs:
tool: protoc

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms
run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms
39 changes: 14 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ jobs:
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: Install Protoc
uses: taiki-e/install-action@v2
Expand All @@ -46,10 +44,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --all
run: cargo test --all-features --all
dist:
name: Dist
runs-on: ${{ matrix.os }}
Expand All @@ -60,7 +55,7 @@ jobs:
build: [x86_64-linux, aarch64-macos, x86_64-macos, x86_64-windows] #, x86_64-win-gnu, win32-msvc aarch64-linux,
include:
- build: x86_64-linux
os: ubuntu-20.04
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
cross: false
Expand Down Expand Up @@ -95,7 +90,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -109,23 +104,17 @@ jobs:
tool: protoc

- name: Install ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}

- name: Install OpenSSL
if: matrix.build == 'aarch64-linux'
run: sudo apt-get install libssl-dev pkg-config

- name: Build release binary
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --locked --target ${{ matrix.target }}
run: cargo build --release --locked --target ${{ matrix.target }}

- name: Strip release binary (linux and macos)
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos'
Expand All @@ -151,7 +140,7 @@ jobs:
cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/"
fi

- uses: actions/upload-artifact@v2.2.4
- uses: actions/upload-artifact@v4
with:
name: bins-${{ matrix.build }}
path: dist
Expand All @@ -162,14 +151,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: false

- uses: actions/download-artifact@v2
# with:
# path: dist
# - run: ls -al ./dist
- uses: actions/download-artifact@v4
with:
pattern: bins-*
# - run: ls -al ./dist
- run: ls -al bins-*

- name: Calculate tag name
Expand All @@ -178,7 +167,7 @@ jobs:
if [[ $GITHUB_REF == refs/tags/v* ]]; then
name=${GITHUB_REF:10}
fi
echo ::set-output name=val::$name
echo "val=$name" >> "$GITHUB_OUTPUT"
echo TAG=$name >> $GITHUB_ENV
id: tagname

Expand Down
111 changes: 0 additions & 111 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion teller-cli/tests/cmd/delete.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ teller delete --providers new --map-id one

$ teller show
? 1
Error: NOT FOUND "new.env": file is empty
Error: NOT FOUND new.env: file is empty

Location:
[..]
Expand Down
4 changes: 2 additions & 2 deletions teller-providers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ aws-sdk-secretsmanager = { version = "1.74.0", optional = true }
# dotenv
dotenvy = { version = "0.15.7", optional = true }
# hashivault
vaultrs = { version = "0.7.4", optional = true }
rustify = { version = "0.6.1", optional = true }
vaultrs = { version = "0.7.4", optional = true, default-features = false, features = ["rustls"] }
rustify = { version = "0.6.1", optional = true, default-features = false, features = ["rustls-tls"] }
# HashiCorp Consul
rs-consul = { version = "0.13.0", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion teller-providers/src/providers/dotenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn save(path: &Path, data: &BTreeMap<String, String>) -> Result<String> {
serde_json::from_str(v);

let json_value = if maybe_json.is_ok() {
serde_json::to_string(&v).map(Some).unwrap_or_default()
serde_json::to_string(&v).ok()
} else {
None
};
Expand Down
Loading