Add ability to backup the database #96
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: RunTests | |
# only trigger on main or PR | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
run-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-writing-an-environment-variable-to-github_env | |
# get Package.swift file contents, find line with swift-tools-version, get string after :, trim whitespaces from string | |
- name: Get swift version from Package.swift file | |
shell: bash | |
run: | | |
echo "swift-tools-version=$( cat ./Package.swift | grep swift-tools-version | cut -d ":" -f2 | sed -e 's/^[[:space:]]*//' )" >> $GITHUB_ENV | |
- uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: "${{ env.swift-tools-version }}" | |
- name: Verify swift version | |
run: swift --version | |
- name: Build | |
run: swift build | |
- name: Run tests | |
run: swift test |