diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 462424f..a088aa4 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -1,5 +1,4 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json ---- name: rdf-protect on: @@ -26,54 +25,54 @@ jobs: source .gitlab/scripts/before-script.sh just nix-develop-ci just format - lint: - runs-on: ubuntu-latest - container: - image: ghcr.io/sdsc-ordes/rdf-protect:ci-lint-1.0.0 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: 2 - lint - run: | - source .gitlab/scripts/before-script.sh && - just nix-develop-ci just lint - - build: - runs-on: ubuntu-latest - container: - image: ghcr.io/sdsc-ordes/rdf-protect:ci-build-1.0.0 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: 3 - build - run: | - source .gitlab/scripts/before-script.sh && - just nix-develop-ci just build - # - name: 3.1 - tests - # run: | - # source .gitlab/scripts/before-script.sh && - # just nix-develop-ci just test - - test: - runs-on: ubuntu-latest - container: - image: ghcr.io/sdsc-ordes/rdf-protect:ci-test-1.0.0 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: 4 - test - run: | - source .gitlab/scripts/before-script.sh && - just nix-develop-ci just test - - package: - runs-on: ubuntu-latest - container: - image: ghcr.io/sdsc-ordes/rdf-protect:ci-package-1.0.0 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: 5 - package (nix) - run: | - source .gitlab/scripts/before-script.sh && - just build-package + # lint: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/sdsc-ordes/rdf-protect:ci-lint-1.0.0 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: 2 - lint + # run: | + # source .gitlab/scripts/before-script.sh && + # just nix-develop-ci just lint + # + # build: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/sdsc-ordes/rdf-protect:ci-build-1.0.0 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: 3 - build + # run: | + # source .gitlab/scripts/before-script.sh && + # just nix-develop-ci just build + # # - name: 3.1 - tests + # # run: | + # # source .gitlab/scripts/before-script.sh && + # # just nix-develop-ci just test + # + # test: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/sdsc-ordes/rdf-protect:ci-test-1.0.0 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: 4 - test + # run: | + # source .gitlab/scripts/before-script.sh && + # just nix-develop-ci just test + # + # package: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/sdsc-ordes/rdf-protect:ci-package-1.0.0 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: 5 - package (nix) + # run: | + # source .gitlab/scripts/before-script.sh && + # just build-package diff --git a/.gitlab/scripts/before-script.sh b/.gitlab/scripts/before-script.sh index 0d6c06f..dd1005c 100755 --- a/.gitlab/scripts/before-script.sh +++ b/.gitlab/scripts/before-script.sh @@ -8,4 +8,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # ci_container_mgr_setup +print_info "Config global:" +git config --global --list | cat + unset ROOT_DIR diff --git a/tools/format-rust.sh b/tools/format-rust.sh index 5e441a9..f6c084e 100755 --- a/tools/format-rust.sh +++ b/tools/format-rust.sh @@ -9,7 +9,13 @@ ROOT_DIR=$(git rev-parse --show-toplevel) cd "$ROOT_DIR" print_info "Run Rust format." + +fmt_args=() +if ci_is_running; then + fmt_args+=("--check") +fi + ci_wrap_container \ ghcr.io/sdsc-ordes/rdf-protect:ci-format-1.0.0 \ nix develop ./tools/nix#ci --command \ - cargo fmt "$@" + cargo fmt "${fmt_args[@]}" "$@"