From 9a89ea523b801232c59b8ea4fd521c2f45f4a503 Mon Sep 17 00:00:00 2001 From: jecaro Date: Fri, 20 Oct 2023 10:38:12 +0200 Subject: [PATCH] replace travis by GitHub actions --- .github/workflows/ci.yml | 13 +++++++++++++ .travis.yml | 37 ------------------------------------- README.md | 23 +++++------------------ 3 files changed, 18 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..16154f2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,13 @@ +name: "CI" +on: [push] +jobs: + build: + runs-on: ubuntu-latest + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + steps: + - uses: actions/checkout@v4 + - run: make build + - run: make test + - run: make deploy diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bcd08ba..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Choose a build environment -dist: xenial - -# Do not choose a language; we provide our own build tools. -language: generic - -services: -- docker - -env: -- CACHE_DIR=docker_image - -# Add a simple cache for docker images as explained here -# https://stackoverflow.com/questions/32866599/can-travis-ci-cache-docker-images/41975912 -cache: - directories: - - ${CACHE_DIR} - -before_cache: -- make cache_dir=${CACHE_DIR} save - -jobs: - include: - - - stage: build - script: make build - - - stage: test - before_install: - - make cache_dir=${CACHE_DIR} load - script: make test - - - stage: deploy - before_install: - - make cache_dir=${CACHE_DIR} load - script: make deploy - diff --git a/README.md b/README.md index 2d4fd60..8193673 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,9 @@ The project page, to add/rename/remove projects: # Deployment and CI -This project is built on each commit on the repository by [travis][status]. A -docker image is automatically sent on [docker hub][dockerhub] when the build and -tests succeed. +This project is built on each commit on the repository by [GitHub +actions][status]. A docker image is automatically sent on [docker +hub][dockerhub] when the build and tests succeed. # How to try it ? @@ -265,19 +265,6 @@ example: - `http://myuser:mypassword@localhost:8081` for http - `https://myuser:mypassword@droplet:443` for joining the server over https -# Roadmap - -- ~~Command line tool~~ -- ~~Unit tests with [hspec][hspec]~~ -- ~~[QuickCheck][quickcheck] property based testing~~ -- ~~CI with [travis][status]~~ -- ~~web server with [servant][servant]~~ -- ~~deployement on [heroku][heroku]~~ -- ~~dockerize the app~~ -- ~~deploy on [digital ocean][digitalocean]~~ -- ~~web frontend with [Elm][elm]~~ - - [digitalocean]: https://www.digitalocean.com/ [dockerhub]: https://hub.docker.com/r/jecaro/hscalendar-server/tags [elm]: https://elm-lang.org/ @@ -294,6 +281,6 @@ example: [refined]: https://github.com/nikita-volkov/refined [rio]: https://github.com/commercialhaskell/rio [servant]: https://github.com/haskell-servant/servant -[status-png]: https://travis-ci.org/jecaro/hscalendar.svg?branch=master -[status]: https://travis-ci.org/jecaro/hscalendar?branch=master +[status-png]: https://github.com/jecaro/hscalendar/workflows/CI/badge.svg +[status]: https://github.com/jecaro/hscalendar/actions [yaml]: https://github.com/snoyberg/yaml