Created
February 18, 2023 15:11
-
-
Save VishwaiOSDev/593e81946b72b3efc4d83f0cf6fa9509 to your computer and use it in GitHub Desktop.
This GitHub Actions workflow is designed to build and test a Swift project when a pull request is opened or updated on the main branch.
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: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Swift | |
uses: slashmo/[email protected] | |
with: | |
version: 5.6 | |
- uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.build/artifacts | |
.build/checkouts | |
.build/repositories | |
.build/workspace-state.json | |
key: test-spm-${{ runner.os }}-${{ hashFiles('Package.swift', 'Package.resolved') }} | |
- name: Build and Test | |
run: swift test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment