dusage 0.2.3

💾 A command line disk usage information tool: disk usage (foreground), inodes (background).
Documentation
name: CI

on:
  push:
    paths-ignore:
      - '*.md'
      - 'screenshots/**'
    branches: [ main ]
  pull_request:
    paths-ignore:
      - '*.md'
      - 'screenshots/**'
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:

  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - uses: extractions/setup-just@v1
      with:
        just-version: 0.10.2  # optional semver specification, otherwise latest

    - name: Cargo Cache
      uses: actions/cache@v1
      with:
        path: ~/.cargo
        key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
        restore-keys: |
          ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
          ${{ runner.os }}-cargo

    - name: Cargo Target Cache
      uses: actions/cache@v1
      with:
        path: target
        key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }}
        restore-keys: |
          ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }}
          ${{ runner.os }}-cargo-target

    - name: Run tests
      run: |
        just test

  coverage:
    if: ${{ false }}  # disable for now
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: extractions/setup-just@v1
        with:
          just-version: 0.10.2  # optional semver specification, otherwise latest

      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true

      - name: Build backend dockers
        run: |
          just build True

      - name: Run cargo-tarpaulin
        uses: actions-rs/tarpaulin@v0.1
        with:
          version: '0.18.5'
          args: '-- --test-threads 1'

      - name: Upload to codecov.io
        uses: codecov/codecov-action@v1.0.2
        with:
          token: ${{secrets.CODECOV_TOKEN}}

      - name: Archive code coverage results
        uses: actions/upload-artifact@v1
        with:
          name: code-coverage-report
          path: cobertura.xml