From e17b3daf93a47c7e640ced30821460362b147905 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Fri, 4 Dec 2020 17:27:46 -0800 Subject: [PATCH 1/4] Migrate to GitHub Actions and update installation instructions. --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ .gitignore | 2 +- .travis.yml | 24 ------------------------ README.md | 4 ++-- 4 files changed, 34 insertions(+), 27 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..e2972ba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: purescript-contrib/setup-purescript@main + with: + purescript: "0.14.0-rc3" + + - uses: actions/setup-node@v1 + with: + node-version: "12" + + - name: Install dependencies + run: | + npm install -g bower + npm install + bower install --production + + - name: Build source + run: npm run-script build + + - name: Run tests + run: | + bower install + npm run-script test --if-present diff --git a/.gitignore b/.gitignore index 709fd09..7224331 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ /.* !/.gitignore !/.eslintrc.json -!/.travis.yml +!/.github/ package-lock.json /bower_components/ /node_modules/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 116705f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: node_js -dist: trusty -sudo: required -node_js: stable -env: - - PATH=$HOME/purescript:$PATH -install: - # - TAG=$(basename $(curl --location --silent --output /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) - - TAG=v0.14.0-rc3 - - curl --location --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - - chmod a+x $HOME/purescript - - npm install -g bower - - npm install -script: - - bower install --production - - npm run -s build - - bower install - - npm -s test -after_success: -- >- - test $TRAVIS_TAG && - echo $GITHUB_TOKEN | pulp login && - echo y | pulp publish --no-push diff --git a/README.md b/README.md index f078d85..d9c26b2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # purescript-ordered-collections [![Latest release](http://img.shields.io/github/release/purescript/purescript-ordered-collections.svg)](https://github.com/purescript/purescript-ordered-collections/releases) -[![Build status](https://travis-ci.org/purescript/purescript-ordered-collections.svg?branch=master)](https://travis-ci.org/purescript/purescript-ordered-collections) +[![Build status](https://github.com/purescript/purescript-ordered-collections/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-ordered-collections/actions?query=workflow%3ACI+branch%3Amaster) Purely-functional map and set data structures. @@ -10,7 +10,7 @@ Purely-functional map and set data structures. ## Installation ``` -bower install purescript-ordered-collections +spago install ordered-collections # or psc-package install ordered-collections ``` From cda68f82a725c9a8027951587c48bc006bf77423 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Mon, 7 Dec 2020 20:35:48 -0800 Subject: [PATCH 2/4] Run CI on push / pull_request to master --- .github/workflows/ci.yml | 6 +++++- README.md | 5 ++--- package.json | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2972ba..55efa3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: push +on: + push: + branches: [master] + pull_request: + branches: [master] jobs: build: diff --git a/README.md b/README.md index d9c26b2..fdf6388 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,16 @@ [![Latest release](http://img.shields.io/github/release/purescript/purescript-ordered-collections.svg)](https://github.com/purescript/purescript-ordered-collections/releases) [![Build status](https://github.com/purescript/purescript-ordered-collections/workflows/CI/badge.svg?branch=master)](https://github.com/purescript/purescript-ordered-collections/actions?query=workflow%3ACI+branch%3Amaster) +[![Pursuit](https://pursuit.purescript.org/packages/purescript-ordered-collections/badge)](https://pursuit.purescript.org/packages/purescript-ordered-collections) Purely-functional map and set data structures. -*If you are looking to work with "StrMap"/JavaScript Objects, see * +_If you are looking to work with "StrMap"/JavaScript Objects, see [`purescript-foreign-object`](https://github.com/purescript/purescript-foreign-object)._ ## Installation ``` spago install ordered-collections -# or -psc-package install ordered-collections ``` ## Documentation diff --git a/package.json b/package.json index e21a9c6..8690cca 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "bench": "npm run bench:build && npm run bench:run" }, "devDependencies": { - "eslint": "^4.19.1", + "eslint": "^7.15.0", "pulp": "^15.0.0", "purescript-psa": "^0.8.0", - "rimraf": "^2.6.2" + "rimraf": "^3.0.2" } } From 2425ea96803c5a60c8c65ee3021cfd57baec27eb Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Mon, 7 Dec 2020 20:41:13 -0800 Subject: [PATCH 3/4] Remove unused eslint dev dependency --- .eslintrc.json | 28 ---------------------------- package.json | 3 +-- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 84cef4f..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 5 - }, - "extends": "eslint:recommended", - "env": { - "commonjs": true - }, - "rules": { - "strict": [2, "global"], - "block-scoped-var": 2, - "consistent-return": 2, - "eqeqeq": [2, "smart"], - "guard-for-in": 2, - "no-caller": 2, - "no-extend-native": 2, - "no-loop-func": 2, - "no-new": 2, - "no-param-reassign": 2, - "no-return-assign": 2, - "no-unused-expressions": 2, - "no-use-before-define": 2, - "radix": [2, "always"], - "indent": [2, 2], - "quotes": [2, "double"], - "semi": [2, "always"] - } -} diff --git a/package.json b/package.json index 8690cca..0f94cb4 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,13 @@ "private": true, "scripts": { "clean": "rimraf output && rimraf .pulp-cache", - "build": "eslint src && pulp build -- --censor-lib --strict", + "build": "pulp build -- --censor-lib --strict", "test": "pulp test", "bench:build": "purs compile \"bench/**/*.purs\" \"src/**/*.purs\" \"bower_components/*/src/**/*.purs\"", "bench:run": "node -e \"require('./output/Bench.Main/index.js').main()\"", "bench": "npm run bench:build && npm run bench:run" }, "devDependencies": { - "eslint": "^7.15.0", "pulp": "^15.0.0", "purescript-psa": "^0.8.0", "rimraf": "^3.0.2" From b7df4fe77236373cbe3e162d36f904eb3eb8d771 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Mon, 7 Dec 2020 20:44:02 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdf6388..647c025 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Purely-functional map and set data structures. -_If you are looking to work with "StrMap"/JavaScript Objects, see [`purescript-foreign-object`](https://github.com/purescript/purescript-foreign-object)._ +_If you are looking to work with JavaScript Objects, see [`purescript-foreign-object`](https://github.com/purescript/purescript-foreign-object)._ ## Installation