Switch to using Penny app to get a GH token #127
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: { pull_request: {} } | |
jobs: | |
test-new: | |
# Run the workflow on multiple machines | |
strategy: | |
fail-fast: false | |
matrix: | |
fluentflags: | |
- --no-fluent | |
- --fluent.db mysql | |
- --fluent.db postgres | |
- --fluent.db sqlite | |
- --fluent.db mongo | |
leafflags: | |
- --leaf | |
- --no-leaf | |
os: [ubuntu-latest] | |
image: ["swift:5.8-focal"] | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.image }} | |
steps: | |
- name: Install SQLite if needed | |
if: ${{ contains(matrix.fluentflags, 'sqlite') }} | |
run: apt-get -q update && apt-get -q install -y libsqlite3-dev | |
- name: Check out toolbox | |
uses: actions/checkout@v2 | |
- name: Build toolbox | |
run: swift build -c debug | |
- name: Execute new project command | |
run: | | |
swift run \ | |
vapor new toolbox-test \ | |
--no-commit -o /tmp/toolbox-test \ | |
${{ matrix.fluentflags }} ${{ matrix.leafflags }} | |
- name: Test new project | |
run: swift test --package-path /tmp/toolbox-test | |
createJSON: | |
runs-on: ubuntu-latest | |
outputs: | |
environments: ${{ steps.output.outputs.environments }} | |
steps: | |
- id: output | |
run: echo "::set-output name=environments::[{\"os\":\"ubuntu-latest\", \"image\":\"swift:5.6-focal\", \"toolchain\":null},{\"os\":\"ubuntu-latest\", \"image\":\"swift:5.8-focal\", \"toolchain\":null},{\"os\":\"macos-13\", \"image\":null, \"toolchain\":\"latest\"}]" | |
test-toolbox: | |
needs: createJSON | |
strategy: | |
fail-fast: false | |
matrix: | |
env: ${{ fromJSON(needs.createJSON.outputs.environments) }} | |
runs-on: ${{ matrix.env.os }} | |
container: ${{ matrix.env.image }} | |
steps: | |
- name: Select toolchain | |
uses: maxim-lobanov/setup-xcode@v1.2.1 | |
with: | |
xcode-version: ${{ matrix.env.toolchain }} | |
if: ${{ matrix.env.toolchain != '' }} | |
- name: Check out toolbox | |
uses: actions/checkout@v2 | |
- name: Run tests with Thread Sanitizer | |
timeout-minutes: 20 | |
run: swift test --sanitize=thread |