Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
pull_request:
push:
branches: [master]
release:
types: [published]

env:
BUNDLE_DIR: bundle

jobs:
build_server:
name: Build server
# Note that this must be kept in sync with the version of Ubuntu which the
# Pursit server is running, otherwise the server binary may fail to run.
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
with:
enable-stack: true
stack-version: "2.5.1"
stack-no-global: true

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('pursuit.cabal') }}

- name: Build server code
run: |
stack --no-terminal --jobs=2 build --flag pursuit:-dev --only-dependencies --fast

- name: Test server code
run: |
stack --no-terminal --jobs=2 test --flag pursuit:-dev --pedantic --only-dependencies --fast

- name: Build server assets
if: github.event_name == 'release'
run: |
mkdir ${{ env.BUNDLE_DIR }}
cp $(stack path --dist-dir)/build/pursit/pursuit ${{ env.BUNDLE_DIR }}/
cp LICENSE ${{ env.BUNDLE_DIR }}/
cp -r deploy/ ${{ env.BUNDLE_DIR }}/
tar czf pursuit.tar.gz -C ${{ env.BUNDLE_DIR }}/ .

- name: Persist server assets
uses: actions/upload-artifact@v2
if: github.event_name == 'release'
with:
name: pursuit.tar.gz
path: pursuit.tar.gz
retention-days: 1

release:
name: Release
# Note that this must be kept in sync with the version of Ubuntu which the
# Pursit server is running, otherwise the server binary may fail to run.
runs-on: ubuntu-18.04
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs:
- build_server
steps:
- name: Retrieve server assets
uses: actions/download-artifact@v2
with:
name: pursuit.tar.gz

- name: Upload assets
uses: softprops/action-gh-release@v1
with:
files: |
pursuit.tar.gz
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pursuit

[![Build Status](https://api.travis-ci.org/purescript/pursuit.svg?branch=master)](https://travis-ci.org/purescript/pursuit)
[![Build Status](https://github.com/purescript/pursuit/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/pursuit/actions?query=workflow%3ACI+branch%3Amaster)

Pursuit hosts API documentation for PureScript packages. It lets you search by
package, module, and function names, as well as approximate type signatures.
Expand Down Expand Up @@ -95,7 +95,7 @@ application, and contains files which do not change and may be served as-is
without forwarding the request on to the Yesod application. See Handler.Caching
for more details.

The `verified/` directory stores uploaded packages. Each package has its own
The `verified/` directory stores uploaded packages. Each package has its own
directory, and then there is a JSON file for each version. These JSON files
each contain a serialized `Package GithubUser`; see
Language.PureScript.Docs.Types in the compiler for details about these types.
Expand Down
21 changes: 0 additions & 21 deletions travis/script.sh

This file was deleted.

17 changes: 0 additions & 17 deletions travis/timeout.sh

This file was deleted.