Make smoke test into integration test with POEditor #184
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Verify code formatting | |
run: | | |
go install mvdan.cc/[email protected] | |
test -z $(gofumpt -l .) | |
- name: Run linter | |
if: always() | |
run: | | |
go install honnef.co/go/tools/cmd/[email protected] | |
staticcheck ./... | |
- name: Run tests with coverage | |
if: always() | |
run: go test -cover ./... | |
integration-test: | |
name: Integration test with Flutter ${{ matrix.flutter_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flutter_version: ['3.13'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Build binary | |
run: | | |
go build | |
mv ./poe2arb /usr/local/bin | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '${{ matrix.flutter_version }}' | |
- name: Run integration test | |
env: | |
POEDITOR_TOKEN: ${{ secrets.POEDITOR_INTEGRATION_TESTS_TOKEN }} | |
run: | | |
cd integration_test | |
poe2arb poe | |
poe2arb poe --output-dir lib/l10n_prefixed --term-prefix prefixed | |
- name: Upload ARBs artifact | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: integration-test-arbs | |
path: | | |
integration_test/lib/l10n/app_en.arb | |
integration_test/lib/l10n/app_pl.arb | |
integration_test/lib/l10n_prefixed/app_en.arb | |
integration_test/lib/l10n_prefixed/app_pl.arb |