From 409feb291cae1cd54620535eeb00e2568388b28f Mon Sep 17 00:00:00 2001 From: Bruno Mendes Date: Sun, 10 Dec 2023 11:16:25 +0000 Subject: [PATCH] Replace action by Acceleo version --- .github/workflows/ci.yml | 90 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afae70cc..be010974 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,52 +1,50 @@ name: ci on: - push: - branches: - - master - pull_request: - + pull_request: master + env: - CARGO_TERM_COLOR: always + CARGO_TERM_COLOR: always + FORMAT: true jobs: - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Format Rust - run: cargo fmt --check - - - name: Format Shell - run: | - sudo apt-get install shfmt - shfmt -i 4 -d . - - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Lint Rust - run: cargo clippy --verbose -- -D warnings - - - name: Lint Shell - uses: ludeeus/action-shellcheck@2.0.0 - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - - name: Test with coverage - run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: codecov.json - fail_ci_if_error: true + format: + env: + FORMAT_SHELL: true + + if: {{env.FORMAT}} + runs_on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - run: cargo fmt --check + - run: sudo apt-get install shfmt; shfmt -i 4 -d . + if: {{env.FORMAT_SHELL}} + + lint: + env: + CARGO_TERM_COLOR: always + + needs: [format] + runs_on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: ludeeus/action-shellcheck@2.0.0 + - run: cargo clippy --verbose -- -D warnings + + test: + + needs: [lint] + runs_on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: taiki-e/install-action@cargo-llvm-cov + - uses: codecov/codecov-action@v3 + with: + files: codecov.json + fail_ci_if_error: true + - run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json \ No newline at end of file