feat(clients/swift): refactor raw string errors into specific enum based errors #18
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: PR Test | |
on: | |
push: | |
branches: | |
- "!main" | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
paths-ignore: | |
- "**.md" | |
jobs: | |
test-php: | |
runs-on: ubuntu-latest | |
container: php:7.4.33-fpm | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- name: Install Composer | |
run: | | |
apt-get update | |
apt-get install git unzip -y | |
pecl install pcov | |
cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini | |
echo "extension=pcov.so\n" >> /usr/local/etc/php/php.ini | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
# php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
php -r "unlink('composer-setup.php');" | |
- run: | | |
cd ./clients/php | |
composer install | |
composer test | |
env: | |
TEST_SERVER_HOST: test-server:3000 | |
test-python: | |
runs-on: ubuntu-latest | |
container: python:3.6.15 | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- run: pip3 install pipenv | |
- run: | | |
cd ./clients/python | |
pipenv install | |
pipenv run pytest --cov=vexilla_client | |
env: | |
TEST_SERVER_HOST: test-server:3000 | |
test-elixir: | |
runs-on: ubuntu-latest | |
container: elixir:1.15.7 | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Mix dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/clients/elixir/_build | |
/clients/elixir/deps | |
key: ${{ runner.os }}-${{ hashFiles('clients/elixir/mix.lock') }} | |
- run: | | |
cd ./clients/elixir | |
mix deps.get | |
mix local.hex --force | |
mix test --cover --export-coverage default | |
mix test.coverage | |
env: | |
TEST_SERVER_HOST: test-server:3000 | |
test-bazel: | |
runs-on: ubuntu-latest | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- run: bazel build //... | |
- run: bazel coverage --combined_report=lcov //... | |
env: | |
TEST_SERVER_HOST: test-server | |
test-kotlin: | |
runs-on: ubuntu-latest | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: corretto | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Execute Gradle build and then test | |
run: | | |
cd clients/kotlin | |
./gradlew build | |
./gradlew test | |
# test-server not available on local network | |
# env: | |
# TEST_SERVER_HOST: test-server | |
test-swift: | |
runs-on: ubuntu-latest | |
container: swift:5.5-focal | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
cd ./clients/swift | |
swift build | |
swift test | |
env: | |
TEST_SERVER_HOST: test-server:3000 | |
test-ocaml: | |
runs-on: ubuntu-latest | |
services: | |
test-server: | |
credentials: | |
username: vexilla | |
password: ${{secrets.GITHUB_TOKEN}} | |
image: ghcr.io/vexilla/test-server:latest | |
ports: | |
- 3000:3000 | |
options: | | |
--health-cmd "curl -f http://localhost:3000/manifest.json" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set-up OCaml 4.14 | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: "4.14" | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/ocaml | |
/clients/ocaml/opam | |
key: ${{ runner.os }}-ocaml-${{ hashFiles('**/*.opam.locked') }} | |
restore-keys: | | |
${{ runner.os }}-ocaml- | |
- run: | | |
cd ./clients/ocaml | |
opam install . --deps-only --with-test --locked | |
opam install alcotest alcotest-lwt | |
opam exec -- dune build | |
opam exec -- dune test | |
env: | |
TEST_SERVER_HOST: test-server:3000 |