npm is nasty #294
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
paths-ignore: | |
- LICENSE | |
- README.* | |
- examples | |
- editors | |
pull_request: | |
paths-ignore: | |
- LICENSE | |
- README.* | |
- examples | |
- editors | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
nim-version: | |
- 'stable' | |
os: | |
- ubuntu-latest | |
# - windows-latest | |
- macOS-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim-version }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# - run: sudo apt-get -y install libsass-dev | |
- run: "npm install cmake-js -g" | |
- run: "choosenim show path -y" | |
- run: nimble install -Y | |
- run: nimble test | |
- run: denim build src/${{ github.event.repository.name }}.nim -r -y --cmake | |
- name: "update tim.node" | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
timNodeName="tim-$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]').node" | |
git pull origin main | |
git checkout . | |
if test -f ./bindings/node/tim/src/bin/$timNodeName; then | |
rm -f ./bindings/node/tim/src/bin/$timNodeName | |
git add ./bindings/node/tim/src/bin/$timNodeName | |
git commit -m "cleanup previous tim.node" | |
fi | |
cp ./bin/tim.node ./bindings/node/tim/src/bin/$timNodeName | |
git status | |
git add ./bindings/node/tim/src/bin/$timNodeName | |
git commit -m "update tim for node on ${{ runner.os }}" | |
- name: Push changes # push the output folder to your repo | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'main' |