Modernize devcontainer #44
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: Check Commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
validate-formatting: | |
name: Validate Formatting | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Initialize devcontainer | |
uses: devcontainers/[email protected] | |
with: | |
push: never | |
runCmd: | | |
echo "Devcontainer Initialized." | |
- name: Validate swift formatting | |
uses: devcontainers/[email protected] | |
with: | |
runCmd: | | |
swift-format \ | |
--in-place \ | |
--recursive Sources Tests | |
git diff | |
git diff-index --quiet HEAD -- | |
test-macos: | |
name: Run Tests on macOS | |
strategy: | |
fail-fast: false | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Correct Swift Version | |
uses: compnerd/gha-setup-swift@main | |
with: | |
branch: swift-5.9-release | |
tag: 5.9-RELEASE | |
- run: swift build | |
- run: swift test | |
- run: swift run ScriptExample | |
test-devcontainer: | |
name: Run Tests on macOS | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Initialize devcontainer | |
uses: devcontainers/[email protected] | |
with: | |
push: never | |
runCmd: | | |
echo "Devcontainer Initialized." | |
- name: Validate swift formatting | |
uses: devcontainers/[email protected] | |
with: | |
runCmd: | | |
swift build | |
swift test | |
swift run ScriptExample |