Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Does not respect 'working-directory' global variable #25

Open
3 tasks done
xcloudplatform opened this issue Jun 10, 2023 · 0 comments
Open
3 tasks done

Does not respect 'working-directory' global variable #25

xcloudplatform opened this issue Jun 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@xcloudplatform
Copy link

xcloudplatform commented Jun 10, 2023

Do the checklist before filing an issue:

Description

does not respect working-directory global variable set like that:

obs:
  build:
    name: Rust project
    runs-on: ubuntu-latest

    strategy:
      matrix:
        project:
          - hold-my-cosmo-contract
          - hold-my-cosmo-ios-app
          - hold-my-cosmo-website

    defaults:
      run:
        working-directory: ${{ matrix.project }}

Workflow code

name: Rust

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: Rust project
    runs-on: ubuntu-latest

    strategy:
      matrix:
        project:
          - hold-my-cosmo-contract
          - hold-my-cosmo-ios-app
          - hold-my-cosmo-website

    defaults:
      run:
        working-directory: ${{ matrix.project }}


    steps:
    - name: Checkout repository
      uses: actions/checkout@v3

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

    - name: Build and Test
      run: |
        cargo build --verbose
        cargo test --verbose

    - name: Run cargo-tarpaulin
      uses: actions-rs/[email protected]
      with:
        version: '0.15.0'
        args: '-- --test-threads 1'

Action output

Run actions-rs/[email protected]
[tarpaulin] downloading cargo-tarpaulin from https://github.com/xd009642/tarpaulin/releases/download/0.15.0/cargo-tarpaulin-0.15.0-travis.tar.gz
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/77ef4a3c-b1[8](https://github.com/xcloudplatform/HoldMyCosmo/actions/runs/5227176973/jobs/9438559644#step:5:9)b-4[9](https://github.com/xcloudplatform/HoldMyCosmo/actions/runs/5227176973/jobs/9438559644#step:5:10)32-b07e-a15d2b5b51bf -f /home/runner/work/_temp/28e9b4f5-cb98-42c3-b792-03053022ad85
[tarpaulin] running tests with coverage tracking
/home/runner/.cargo/bin/cargo tarpaulin --out Xml -- --test-threads 1
Jun [10](https://github.com/xcloudplatform/HoldMyCosmo/actions/runs/5227176973/jobs/9438559644#step:5:11) 00:37:39.048  INFO cargo_tarpaulin::config: Creating config
Jun 10 00:37:39.059  WARN cargo_tarpaulin::config: Couldn't get project metadata Error during execution of `cargo metadata`: error: manifest path `/home/runner/work/HoldMyCosmo/HoldMyCosmo/Cargo.toml` does not exist

Jun 10 00:37:39.059  INFO cargo_tarpaulin: Running Tarpaulin
Jun 10 00:37:39.059  INFO cargo_tarpaulin: Building project
Jun 10 00:37:39.068 ERROR cargo_tarpaulin: Cargo failed to run! Error: Error during execution of `cargo metadata`: error: manifest path `/home/runner/work/HoldMyCosmo/HoldMyCosmo/Cargo.toml` does not exist

Error: "Cargo failed to run! Error: Error during execution of `cargo metadata`: \u{1b}[0m\u{1b}[0m\u{1b}[1m\u{1b}[31merror\u{1b}[0m\u{1b}[1m:\u{1b}[0m manifest path `/home/runner/work/HoldMyCosmo/HoldMyCosmo/Cargo.toml` does not exist\n"
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 1

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Add any other context about the problem here.

@xcloudplatform xcloudplatform added the bug Something isn't working label Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant