Skip to content

Commit

Permalink
Bump pre-commit/pre-commit-hooks from 4.3.0 to 4.4.0 (#112)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 →
v4.4.0](pre-commit/pre-commit-hooks@v4.3.0...v4.4.0)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: fabasoad <fabasoad@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and fabasoad authored Nov 29, 2022
1 parent 2c4ae3c commit d636504
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 152 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ jobs:
id: latest_release
run: |
latest_tag=$(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "::set-output name=tag::${latest_tag}"
echo "tag=${latest_tag}" >> $GITHUB_OUTPUT
shell: sh
- name: Get current release tag
id: current_release
run: echo "::set-output name=tag::${GITHUB_REF/refs\/tags\//}"
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
- name: Build changelog
id: changelog
run: |
body=$(git log --pretty=oneline ${{ steps.latest_release.outputs.tag }}..${{ steps.current_release.outputs.tag }})
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "::set-output name=body::${body}"
echo "body=${body}" >> $GITHUB_OUTPUT
shell: bash
- name: Create release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -42,3 +45,7 @@ jobs:
${{ steps.changelog.outputs.body }}
draft: false
prerelease: false
- name: Bump tags
uses: fischerscode/tagger@v0
with:
prefix: v
75 changes: 31 additions & 44 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,45 @@ on:
pull_request:

jobs:
functional_tests:
translate:
name: Translate
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
source: ['Love']
fail-fast: false
matrix:
include:
- provider: linguatools
lang: 'en-de'
source: Love
expected: Liebe
api_key: N_A # pragma: allowlist secret
- provider: mymemory
lang: 'en|it'
source: Love
expected: 'Con affetto,'
api_key: N_A # pragma: allowlist secret
- provider: mymemory
lang: 'en|pt'
source: Love
expected: 'Com gratidão,'
api_key: MYMEMORY_API_KEY # pragma: allowlist secret
- provider: funtranslations
lang: 'klingon'
source: Love
expected: Parmaq
api_key: N_A # pragma: allowlist secret
steps:
- uses: actions/checkout@v3
- uses: ./
id: linguatools
with:
provider: linguatools
lang: 'en-de'
source: ${{ matrix.source }}
- name: Validate Linguatools translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.linguatools.outputs.text }}'"
[[ "${{ steps.linguatools.outputs.text }}" == "Liebe" ]] || exit 1;
shell: bash
- uses: ./
id: mymemory_free
with:
provider: mymemory
lang: 'en|pt'
source: ${{ matrix.source }}
- name: Validate MyMemory (Free) translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.mymemory_free.outputs.text }}'"
[[ "${{ steps.mymemory_free.outputs.text }}" == "Com gratidão," ]] || exit 1;
shell: bash
- uses: ./
id: mymemory_registered
with:
provider: mymemory
api_key: ${{ secrets.MYMEMORY_API_KEY }}
lang: 'en|it'
source: ${{ matrix.source }}
- name: Validate MyMemory (Registered) translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.mymemory_registered.outputs.text }}'"
[[ "${{ steps.mymemory_registered.outputs.text }}" == "amore" ]] || exit 1;
shell: bash
- uses: ./
id: funtranslations
id: result
with:
provider: funtranslations
lang: 'klingon'
provider: ${{ matrix.provider }}
lang: ${{ matrix.lang }}
source: ${{ matrix.source }}
- name: Validate FunTranslations translation result
api_key: "${{ secrets[matrix.api_key] }}"
- name: Validate ${{ matrix.provider }} translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.funtranslations.outputs.text }}'"
[[ "${{ steps.funtranslations.outputs.text }}" == "Parmaq" ]] || exit 1;
shell: bash
echo "'${{ matrix.source }}' has been translated to '${{ steps.result.outputs.text }}'"
[ "${{ steps.result.outputs.text }}" = "${{ matrix.expected }}" ] || exit 1;
shell: sh
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
default_install_hook_types: ["pre-commit", "pre-push"]
default_stages: ["commit"]
exclude: ^(.gitleaks\.toml|dist/.*\.js)$
minimum_pre_commit_version: 2.18.0
repos:
- repo: local
hooks:
Expand Down Expand Up @@ -52,10 +54,9 @@ repos:
rev: v1.28.0
hooks:
- id: yamllint
args: ["-c", ".yamllint.yml"]
# Other
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand All @@ -67,5 +68,5 @@ repos:
- id: no-commit-to-branch
- id: trailing-whitespace
ci:
autofix_prs: false
autofix_prs: true
skip: [build, eslint, test]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"devDependencies": {
"@types/jest": "29.2.3",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"@vercel/ncc": "0.34.0",
"dotenv": "16.0.3",
"eslint": "8.28.0",
Expand Down
Loading

0 comments on commit d636504

Please sign in to comment.