diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 20338ed5bc..0000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,78 +0,0 @@ -on: - pull_request: - paths: - # Only run coverage report if the sources have changed - - "src/**.rs" - - "crates/**.rs" - push: - branches: - - main - paths: - # Only run coverage report if the sources have changed - - "src/**.rs" - - "crates/**.rs" - -name: Code Coverage -jobs: - codecov: - runs-on: ubuntu-latest - container: - image: xd009642/tarpaulin:0.26.0 - options: --security-opt seccomp=unconfined --privileged - env: - SPFS_SUPPRESS_OVERLAYFS_PARAMS_WARNING: "1" - # Enable sccache for rust - SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - - name: Setup spfs repos - run: | - mkdir /spfs - mkdir -p /tmp/spfs-repos/local - mkdir -p /tmp/spfs-repos/origin - cat >/etc/spfs.conf << EOF - [storage] - root = /tmp/spfs-repos/local - - [remote.origin] - address = file:///tmp/spfs-repos/origin?create=true - EOF - - name: Install prerequisites - run: | - apt-get update - apt-get install --yes libcap2-bin tcsh rsync sudo protobuf-compiler fuse libfuse-dev - # spfs "custom build command" needs rustfmt? (protobufs?) - rustup component add rustfmt - - uses: actions/checkout@v3 - - name: Configure cargo - run: | - mkdir -p .cargo - cat << EOF > .cargo/config.toml - [build] - # Disable incremental compilation to lower disk usage, and sccache - # can't cache incremental compiles. - incremental = false - - [profile.dev] - # Disable debug information to lower disk usage. - debug = false - EOF - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - name: Install spfs - run: make install-debug-spfs FEATURES=server,spfs/server - - name: Generate code coverage - run: | - # Enable migration-to-components feature here so that the test suite - # is run with that feature enabled. Not specifically for coverage - # purposes, but because there wouldn't otherwise be a run of the - # test suite with this feature enabled anywhere in the currently - # configured github workflows. Tests have frequently not passed when - # this feature is enabled. - spfs run - -- bash -c 'cargo tarpaulin --features migration-to-components --workspace --verbose --timeout 120 --out Xml' - - name: Upload to codecov.io - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }}