Add Nushell completions #458
Workflow file for this run
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
name: Rust-CI | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: "17 17 * * *" | |
pull_request: | |
# types: [labeled, review_requested] | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
coverage: | |
name: Test and Coverage | |
if: github.actor == 'iesahin' | |
runs-on: macos-latest | |
timeout-minutes: 50 | |
strategy: | |
matrix: | |
build: [stable] | |
include: | |
- build: stable | |
rust: stable | |
# rust: nightly-2024-01-01 | |
test-args: --features test-ci # --no-fail-fast | |
## for submitters other than me, I'll add another job here. | |
# benches: true | |
coverage: true | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
DIGITAL_OCEAN_ACCESS_KEY_ID: ${{ secrets.DIGITAL_OCEAN_ACCESS_KEY_ID }} | |
DIGITAL_OCEAN_SECRET_ACCESS_KEY: ${{ secrets.DIGITAL_OCEAN_SECRET_ACCESS_KEY }} | |
# WASABI_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }} | |
# WASABI_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }} | |
GCS_ACCESS_KEY_ID: ${{ secrets.GCS_ACCESS_KEY_ID }} | |
GCS_SECRET_ACCESS_KEY: ${{ secrets.GCS_SECRET_ACCESS_KEY }} | |
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
MINIO_ACCESS_KEY_ID: ${{ secrets.MINIO_ACCESS_KEY_ID }} | |
MINIO_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_ACCESS_KEY }} | |
XVC_TEST_ONE_EMRESULT_COM_KEY: ${{ secrets.XVC_TEST_ONE_EMRESULT_COM_KEY }} | |
# We don't run xvc-storage and how-to tests here | |
XVC_TRYCMD_TESTS: core,file,pipeline,intro,start,storage | |
XVC_TRYCMD_STORAGE_TESTS: minio,generic,local, | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install required packages | |
run: | | |
brew install s3cmd | |
brew install ripgrep | |
brew install tree | |
brew install lsd | |
brew install python3 | |
brew install minio/stable/mc | |
- name: Git config for automated Git tests | |
run: git config --global user.name 'Xvc Rabbit' && git config --global user.email 'rabbit@xvc.dev' && git config --global init.defaultBranch main | |
- name: Write the private key file for e1.xvc.dev connection | |
run: mkdir -p $HOME/.ssh/ && echo "${XVC_TEST_ONE_EMRESULT_COM_KEY}" > $HOME/.ssh/id_rsa ; chmod 600 ~/.ssh/id_rsa | |
- name: Write an ssh config to allow connection without noise | |
run: echo 'Host *' >> $HOME/.ssh/config ; echo ' StrictHostKeyChecking no' >> $HOME/.ssh/config ; echo ' LogLevel ERROR' >> $HOME/.ssh/config ; chmod 400 $HOME/.ssh/config | |
# - name: List .ssh contents | |
# run: ls -R $HOME/.ssh ; cat $HOME/.ssh/id_rsa ; cat $HOME/.ssh/config | |
# | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust || 'stable' }} | |
components: llvm-tools-preview | |
- name: Build debug | |
run: cargo build ${{ matrix.build-args }} | |
env: | |
RUSTFLAGS: "-A dead_code" | |
- name: Add xvc to PATH | |
run: echo "${GITHUB_WORKSPACE}/target/debug" >> $GITHUB_PATH | |
# - name: Print contents of $GITHUB_WORKSPACE | |
# run: tree $GITHUB_WORKSPACE | |
- name: Check if xvc is in PATH | |
# run: tree $GITHUB_WORKSPACE && xvc --version | |
run: xvc --version | |
- name: Install cargo-llvm-cov | |
if: matrix.coverage | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Run Current Dev Tests | |
run: $GITHUB_WORKSPACE/run-tests.zsh | |
- name: Test and Coverage | |
id: coverage | |
if: matrix.coverage | |
run: cargo llvm-cov ${{ matrix.test-args }} --workspace --lcov --output-path lcov.info | |
env: | |
# To debug the output when commands fail | |
TRYCMD: "dump" | |
# Limit the docs we run tests | |
XVC_TRYCMD_TESTS: "storage,file,pipeline,core,start" | |
- name: Upload to codecov.io | |
if: matrix.coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ steps.coverage.outputs.report }} | |
- name: Test all benches | |
if: matrix.benches | |
run: cargo test --benches ${{ matrix.features }} |