Skip to content

Bump follow-redirects from 1.15.5 to 1.15.6 (#145) #11

Bump follow-redirects from 1.15.5 to 1.15.6 (#145)

Bump follow-redirects from 1.15.5 to 1.15.6 (#145) #11

---
name: Test providers
on:
pull_request:
paths:
- .github/workflows/test-providers.yml
- dist/**
- src/**
- action.yml
push:
branches:
- main
defaults:
run:
shell: sh
jobs:
test-providers:
name: ${{ matrix.provider }}
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- provider: "deepl"
lang: "en-uk"
source: "Love"
expected: "Любов"
api_key: "DEEPL_API_KEY" # pragma: allowlist secret
- provider: "google"
lang: "en-hr"
source: "Love"
expected: "Ljubav"
api_key: "N_A" # pragma: allowlist secret
- provider: "linguatools"
lang: "en-de"
source: "Love"
expected: "Love"
api_key: "N_A" # pragma: allowlist secret
- provider: "mymemory"
lang: "en|it"
source: "Love"
expected: "L'amore"
api_key: "N_A" # pragma: allowlist secret
- provider: "mymemory"
lang: "en|pt"
source: "Love"
expected: "Amor"
api_key: "MYMEMORY_API_KEY" # pragma: allowlist secret
- provider: "funtranslations"
lang: "klingon"
source: "Love"
expected: "Parmaq"
api_key: "N_A" # pragma: allowlist secret
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Translate (${{ matrix.provider }}, ${{ matrix.lang }})
uses: ./
id: result
with:
provider: ${{ matrix.provider }}
lang: ${{ matrix.lang }}
source: ${{ matrix.source }}
api_key: "${{ secrets[matrix.api_key] }}"
- name: Validate ${{ matrix.provider }} translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.result.outputs.text }}'"
[ "${{ steps.result.outputs.text }}" = "${{ matrix.expected }}" ] || exit 1;