Skip to content

Commit 75ee363

Browse files
author
Serhii Khoma
committed
feat: migrate to spago@next
1 parent df3461b commit 75ee363

File tree

7 files changed

+35
-63
lines changed

7 files changed

+35
-63
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,37 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
48

59
jobs:
610
build:
711
runs-on: ubuntu-latest
8-
912
steps:
10-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up a PureScript toolchain
16+
uses: purescript-contrib/setup-purescript@main
17+
with:
18+
purescript: "latest"
19+
purs-tidy: "latest"
20+
spago: "unstable"
1121

1222
- name: Cache PureScript dependencies
13-
uses: actions/cache@v2
23+
uses: actions/cache@v4
1424
with:
15-
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }}
25+
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }}
1626
path: |
1727
.spago
1828
output
1929
20-
- name: Set up Node toolchain
21-
uses: actions/setup-node@v2
22-
with:
23-
node-version: "20.x"
24-
25-
- name: Cache NPM dependencies
26-
uses: actions/cache@v2
27-
env:
28-
cache-name: cache-node-modules
29-
with:
30-
path: ~/.npm
31-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
32-
restore-keys: |
33-
${{ runner.os }}-build-${{ env.cache-name }}-
34-
${{ runner.os }}-build-
35-
${{ runner.os }}-
36-
37-
- name: Install NPM dependencies
38-
run: npm install -g spago@next purescript@latest
39-
40-
- name: Install NPM dependencies
41-
run: npm install
42-
43-
- name: Build the project
44-
run: npm run build
45-
46-
- name: Build and bundle tests
47-
run: ./node_modules/@vercel/ncc/dist/ncc/cli.js build --minify test/index.js
30+
- name: Build source
31+
run: spago build --censor-stats --strict --pedantic-packages
4832

4933
- name: Run tests
50-
uses: ./test
51-
with:
52-
testinput: test
34+
run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning
5335

54-
- name: Verify Bower & Pulp
55-
run: |
56-
npm install bower [email protected]
57-
npx bower install
58-
npx pulp build
36+
- name: Verify formatting
37+
run: purs-tidy check src test

bower.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"name": "purescript-github-actions-toolkit",
3-
"license": [
4-
"MIT"
5-
],
3+
"license": "MIT",
64
"repository": {
75
"type": "git",
86
"url": "https://github.com/purescript-contrib/purescript-github-actions-toolkit"
@@ -12,16 +10,5 @@
1210
"node_modules",
1311
"bower_components",
1412
"output"
15-
],
16-
"dependencies": {
17-
"purescript-aff": "^7.0.0",
18-
"purescript-aff-promise": "^4.0.0",
19-
"purescript-effect": "^4.0.0",
20-
"purescript-foreign-object": "^4.0.0",
21-
"purescript-node-buffer": "^8.0.0",
22-
"purescript-node-path": "^5.0.0",
23-
"purescript-node-streams": "^7.0.0",
24-
"purescript-nullable": "^6.0.0",
25-
"purescript-transformers": "^6.0.0"
26-
}
13+
]
2714
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"private": true,
33
"scripts": {
44
"build": "eslint src && spago build --strict --censor-stats --pedantic-packages",
5-
"test": "spago test --no-install"
5+
"test": "spago test --offline"
66
},
77
"devDependencies": {
8-
"@vercel/ncc": "^0.38.1",
9-
"eslint": "^8.57.0"
8+
"@vercel/ncc": "^0.38.2",
9+
"eslint": "^9.12.0"
1010
},
1111
"dependencies": {
1212
"@actions/cache": "^3.2.4",
13-
"@actions/core": "^1.10.1",
13+
"@actions/core": "^1.11.1",
1414
"@actions/exec": "^1.1.1",
1515
"@actions/io": "^1.1.3",
1616
"@actions/tool-cache": "^2.0.1"

spago.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package:
22
name: github-actions-toolkit
3+
publish:
4+
license: MIT
5+
version: 0.5.0
6+
location:
7+
githubOwner: purescript-contrib
8+
githubRepo: purescript-github-actions-toolkit
39
dependencies:
410
- aff
511
- aff-promise
@@ -19,6 +25,6 @@ package:
1925
dependencies:
2026
- either
2127
workspace:
22-
package_set:
23-
registry: 50.4.0
24-
extra_packages: {}
28+
packageSet:
29+
registry: 60.5.0
30+
extraPackages: {}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)