Skip to content

Commit 1b2f3bd

Browse files
Add note about caching PureScript deps to README
1 parent 4f99ea2 commit 1b2f3bd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,42 @@ steps:
4949
- run: spago build
5050
```
5151
52+
## Full Example Workflow
53+
54+
This workflow is a useful starting point for new projects and libraries. You can add a `.yml` file with the contents below to the `.github/workflows` directory in your project (for example: `.github/workflows/ci.yml`).
55+
56+
```yml
57+
name: CI
58+
59+
on: push
60+
61+
jobs:
62+
build:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v2
66+
67+
- uses: thomashoneyman/setup-purescript@main
68+
69+
- name: Cache PureScript dependencies
70+
uses: actions/cache@v2
71+
# This cache uses the .dhall files to know when it should reinstall
72+
# and rebuild packages. It caches both the installed packages from
73+
# the `.spago` directory and compilation artifacts from the `output`
74+
# directory. When restored the compiler will rebuild any files that
75+
# have changed. If you do not want to cache compiled output, remove
76+
# the `output` path.
77+
with:
78+
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
79+
path: |
80+
.spago
81+
output
82+
83+
- run: spago build
84+
85+
- run: spago test --no-install
86+
```
87+
5288
## Development
5389
5490
Enter a development shell with necessary tools installed:

0 commit comments

Comments
 (0)