Skip to content

Tests

Tests #41

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Wait for Random Time
if: github.event_name == 'schedule'
shell: bash
run: |
# Generate a random delay up to 3600 seconds (1 hour)
RANDOM_DELAY=$(( RANDOM % 3600 ))
echo "Waiting for $RANDOM_DELAY seconds"
sleep $RANDOM_DELAY
# Proceed with the rest of your job
echo "Proceeding with the job after delay"
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v