Skip to content

Commit

Permalink
Add auto tests, lower swift tool version to 5.10.0, update README (#16)
Browse files Browse the repository at this point in the history
* feat: keep up with ts-fsrs, update algorithm version to 5.0

- Delete original source file
- Implemented FSRS 5.0
- Add tests

* feat: add github actions auto tests

- Create README.md
- convert code tests coverage report to lcov
- add codecov report
- lower the package build tool version to 5.10.0
  • Loading branch information
ningkaiqiang authored Oct 30, 2024
1 parent 129e4dc commit 3d19310
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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: Swift

on:
push:
branches: [ "main" ]
paths-ignore:
# - '.github/**'
- ".gitignore"
- "LICENSE"
- "README.md"
pull_request:
branches: [ "main" ]
paths-ignore:
# - '.github/**'
- ".gitignore"
- "LICENSE"
- "README.md"
jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v --enable-code-coverage

- name: Test coverage
uses: ningkaiqiang/spm-lcov-action@master
with:
output-file: ./coverage/lcov.info

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 5.10.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A Swift implementation of FSRS5.0

[![codecov](https://codecov.io/gh/ningkaiqiang/swift-fsrs/graph/badge.svg?token=DQSJTROPFG)](https://codecov.io/gh/ningkaiqiang/swift-fsrs)

0 comments on commit 3d19310

Please sign in to comment.