Skip to content

Commit

Permalink
Merge pull request #241 from gematik/johannes/polarion-upload
Browse files Browse the repository at this point in the history
Allow uploading images to Polarion
  • Loading branch information
Johennes authored Jun 5, 2024
2 parents b806b99 + 1de6c50 commit 8401beb
Show file tree
Hide file tree
Showing 14 changed files with 1,831 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/actions/lint-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint AsciiDoc

runs:
using: "composite"
steps:
- name: Verify format of Rust code
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}
rc=0
while read -r file; do
echo "Checking $(basename "$file")"
if ! cargo fmt --check --manifest-path "$file"; then
rc=1
fi
done < <(find . -type f -name "Cargo.toml")
exit $rc
- name: Lint Rust code
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}
rc=0
while read -r file; do
echo "Checking $(basename "$file")"
if ! cargo clippy --all-targets --all-features --manifest-path "$file"; then
rc=1
fi
done < <(find . -type f -name "Cargo.toml")
exit $rc
12 changes: 11 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,14 @@ jobs:
uses: actions/checkout@v4

- name: Lint
uses: ./.github/actions/lint-plantuml
uses: ./.github/actions/lint-plantuml

rust:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Lint
uses: ./.github/actions/lint-rust
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.dtmp
src/fhir/input-cache
.idea
.idea
target/
26 changes: 26 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Usage

From this folder, run

```
cargo run ../../images/generated/TI-M_Pro/UC_10059_Seq.png
```

and follow the prompts.

To run from another folder use the `--manifest-path` flag, e.g.

```
cargo run --manifest-path tools/upload-polarion-attachment/Cargo.toml images/generated/TI-M_Pro/UC_10059_Seq.png
```

Only works while on the VPN and when `POLARION_ACCESS_TOKEN` is available in the environment.

# Development

To format and lint locally, run

```
cargo fmt
cargo clippy --all-targets --all-features
```
Loading

0 comments on commit 8401beb

Please sign in to comment.