updated docker/workflows to 5.2 #54
This file contains hidden or 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: | |
| - master | |
| jobs: | |
| xenial: | |
| container: | |
| image: vapor/swift:5.2-xenial | |
| services: | |
| psql: | |
| image: postgres | |
| volumes: | |
| - ./seed.sql:/docker-entrypoint-initdb.d/init.sql | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: vapor | |
| POSTGRES_DB: vii-test | |
| POSTGRES_PASSWORD: password | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - run: swift test --enable-test-discovery --sanitize=thread --enable-code-coverage | |
| bionic: | |
| container: | |
| image: vapor/swift:5.2-bionic | |
| services: | |
| psql: | |
| image: postgres | |
| volumes: | |
| - ./seed.sql:/docker-entrypoint-initdb.d/init.sql | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: vapor | |
| POSTGRES_DB: vii-test | |
| POSTGRES_PASSWORD: password | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - run: swift test --enable-test-discovery --sanitize=thread --enable-code-coverage | |
| - name: Setup container for codecov upload | |
| run: apt-get update && apt-get install curl | |
| - name: Process coverage file | |
| run: llvm-cov show .build/x86_64-unknown-linux/debug/viiPackageTests.xctest -ignore-filename-regex="(.build|TestUtils|Tests)" -instr-profile=.build/x86_64-unknown-linux/debug/codecov/default.profdata > coverage.txt | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_UPLOAD_KEY }} | |
| file: coverage.txt |