davidearl / webauthn

An implementation of webauthn in PHP on the server side (e.g Yubico 2 and Google Titan keys)
https://webauthn.davidearl.uk
MIT License
129 stars 24 forks source link

Travis CI and unit testing #32

Closed benjamindoe closed 4 years ago

benjamindoe commented 4 years ago

It would be great to see CI on this project. I thought travis and atoum would be a good start. I've created an example test case and also a travis.yml (Travis is also free!). The catastrophe of the merges conflicts going wrong would also not happen (sorry 🤦) as Travis also builds PRs.

Running local tests

  1. Run composer install. atoum/atoum is a dev requirement
  2. Run vendor/bin/atoum -d tests/units/

Writing Tests

http://docs.atoum.org/en/latest/first_test.html

Travis CI

https://travis-ci.com Log into Travis using your GitHub account. It should be able to see all current repos. Enable the repo and Travis should automatically detect the .travis.yml.