Merge pull request #121 from swiftwasm/dependabot/npm_and_yarn/eslint… #253
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: "units-test" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - 'releases/*' | |
| jobs: | |
| # unit tests | |
| units: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: npm ci | |
| - run: npm test | |
| test: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| - os: ubuntu-latest | |
| container: swift:6.0.3 | |
| runs-on: ${{ matrix.os }} | |
| container: ${{ matrix.container }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install OSS Swift on macOS | |
| if: ${{ startsWith(matrix.os, 'macos') }} | |
| run: | | |
| SWIFT_TOOLCHAIN_CHANNEL=swift-6.0.3-release; | |
| SWIFT_TOOLCHAIN_TAG="swift-6.0.3-RELEASE"; | |
| pkg="$(mktemp -d)/InstallMe.pkg"; set -ex; | |
| curl -o "$pkg" "https://download.swift.org/$SWIFT_TOOLCHAIN_CHANNEL/xcode/$SWIFT_TOOLCHAIN_TAG/$SWIFT_TOOLCHAIN_TAG-osx.pkg"; | |
| installer -pkg "$pkg" -target CurrentUserHomeDirectory; | |
| TOOLCHAINS="$(plutil -extract CFBundleIdentifier raw ~/Library/Developer/Toolchains/$SWIFT_TOOLCHAIN_TAG.xctoolchain/Info.plist)"; | |
| echo "TOOLCHAINS=$TOOLCHAINS" >> $GITHUB_ENV | |
| - run: swift --version | |
| - uses: ./ | |
| id: setup-swiftwasm | |
| - run: | | |
| mkdir -p /tmp/hello | |
| cd /tmp/hello | |
| swift package init --type executable | |
| swift build --swift-sdk "${{ steps.setup-swiftwasm.outputs.swift-sdk-id }}" |