name: "Swift analysis using autobuild"
description: "Tests creation of a Swift database using autobuild"
versions:
  - nightly-latest
operatingSystems:
  - os: macos
    runner-image: macos-latest-xlarge
steps:
  - uses: ./../action/init
    id: init
    with:
      languages: swift
      build-mode: autobuild
      tools: ${{ steps.prepare-test.outputs.tools-url }}
  - name: Check working directory
    run: pwd
  - uses: ./../action/autobuild
    timeout-minutes: 30
  - uses: ./../action/analyze
    id: analysis
    with:
      upload-database: false
  - name: Check database
    run: |
      SWIFT_DB="${{ fromJson(steps.analysis.outputs.db-locations).swift }}"
      if [[ ! -d "$SWIFT_DB" ]]; then
        echo "Did not create a database for Swift."
        exit 1
      fi
