From 2491c2b7723c17195ee9ae70dc200cd219c1711b Mon Sep 17 00:00:00 2001 From: Esteban Martinena Guerrero Date: Sun, 9 Apr 2023 10:15:50 +0200 Subject: [PATCH 1/4] uniq workflow --- .github/workflows/uniq.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/uniq.yaml diff --git a/.github/workflows/uniq.yaml b/.github/workflows/uniq.yaml new file mode 100644 index 000000000..cff2a12fd --- /dev/null +++ b/.github/workflows/uniq.yaml @@ -0,0 +1,20 @@ +name: Check uniq keys + +on: + push: + paths: + - 'client/dictionaries/**' + pull_request: + paths: + - 'client/dictionaries/**' + workflow_dispatch: + + +jobs: + check-unique: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: | + find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " + if [[ $(find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " | grep -v "./" | wc -l) -gt 0 ]]; then exit 1; fi From a1e8161aff03ef7fe1e8a1036ed5470493a7727e Mon Sep 17 00:00:00 2001 From: Esteban Martinena Guerrero Date: Sun, 9 Apr 2023 10:17:15 +0200 Subject: [PATCH 2/4] fix --- .github/workflows/uniq.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/uniq.yaml b/.github/workflows/uniq.yaml index cff2a12fd..2c56c5bbf 100644 --- a/.github/workflows/uniq.yaml +++ b/.github/workflows/uniq.yaml @@ -15,6 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " - if [[ $(find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " | grep -v "./" | wc -l) -gt 0 ]]; then exit 1; fi + - name: check unique keys in dic filesç + shell: bash + run: | + find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " + if [[ $(find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " | grep -v "./" | wc -l) -gt 0 ]]; then exit 1; fi + From a7abe86efe1b4ddeb4be13c86d78e2eacb8763e8 Mon Sep 17 00:00:00 2001 From: Esteban Martinena Guerrero Date: Sun, 9 Apr 2023 10:24:21 +0200 Subject: [PATCH 3/4] 22.04 --- .github/workflows/uniq.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uniq.yaml b/.github/workflows/uniq.yaml index 2c56c5bbf..0c4966574 100644 --- a/.github/workflows/uniq.yaml +++ b/.github/workflows/uniq.yaml @@ -12,7 +12,7 @@ on: jobs: check-unique: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: check unique keys in dic filesç From 3cf938c38a3d4f797bda195558974c9b0ec09af1 Mon Sep 17 00:00:00 2001 From: Esteban Martinena Guerrero Date: Sun, 9 Apr 2023 17:57:24 +0200 Subject: [PATCH 4/4] minor job name fix --- .github/workflows/uniq.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uniq.yaml b/.github/workflows/uniq.yaml index 0c4966574..89f845483 100644 --- a/.github/workflows/uniq.yaml +++ b/.github/workflows/uniq.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: check unique keys in dic filesç + - name: check unique keys in dic files shell: bash run: | find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r "