-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/update ci Update CI to run with swift 5.5 only (#376)
* Update test to use only 2 swift images * Changed OS to not be a string * change workflow to use manual testing This commit is only for testing purposes * Add comment to help with readability * Change to try and run the test github action * Remove getcidata and use only swift 5.5 for test * Update to test * reinstate on push branch action * Turn json into string * Create json seperately * Reformat JSON * Edit JSON * Remove {} from JSON string * Remove on push branch for testing
- Loading branch information
1 parent
7575fe2
commit 3526af2
Showing
1 changed file
with
18 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
name: test | ||
on: { pull_request: {} } | ||
|
||
jobs: | ||
getcidata: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
environments: ${{ steps.output.outputs.environments }} | ||
steps: | ||
- id: output | ||
run: | | ||
envblob="$(curl -fsSL https://raw.githubusercontent.com/vapor/ci/main/pr-environments.json | jq -cMj '.')" | ||
echo "::set-output name=environments::${envblob}" | ||
|
||
jobs: | ||
test-new: | ||
needs: getcidata | ||
# Run the workflow on multiple machines | ||
strategy: | ||
fail-fast: false | ||
# TODO: This produces 40 checks, that's too many | ||
matrix: | ||
fluentflags: | ||
- --no-fluent | ||
|
@@ -27,17 +17,13 @@ jobs: | |
leafflags: | ||
- --leaf | ||
- --no-leaf | ||
env: ${{ fromJSON(needs.getcidata.outputs.environments) }} | ||
runs-on: ${{ matrix.env.os }} | ||
container: ${{ matrix.env.image }} | ||
os: [ubuntu-latest] | ||
image: ["swift:5.5-focal"] | ||
runs-on: ${{ matrix.os }} | ||
container: ${{ matrix.image }} | ||
steps: | ||
- name: Select toolchain | ||
uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: ${{ matrix.env.toolchain }} | ||
if: ${{ matrix.env.toolchain != '' }} | ||
- name: Install SQLite if needed | ||
if: ${{ contains(matrix.fluentflags, 'sqlite') && matrix.env.image != '' }} | ||
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 | ||
|
@@ -52,12 +38,20 @@ jobs: | |
- name: Test new project | ||
run: swift test --package-path /tmp/toolbox-test --enable-test-discovery | ||
|
||
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.2-focal\", \"toolchain\":null},{\"os\":\"ubuntu-latest\", \"image\":\"swift:5.5-focal\", \"toolchain\":null},{\"os\":\"macos-11\", \"image\":null, \"toolchain\":\"latest\"}]" | ||
|
||
test-toolbox: | ||
needs: getcidata | ||
needs: createJSON | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
env: ${{ fromJSON(needs.getcidata.outputs.environments) }} | ||
env: ${{ fromJSON(needs.createJSON.outputs.environments) }} | ||
runs-on: ${{ matrix.env.os }} | ||
container: ${{ matrix.env.image }} | ||
steps: | ||
|