From 80de39c7c18ae32efeec80571724eebee4945d8f Mon Sep 17 00:00:00 2001 From: aesthetic0001 <15858616+aesthetic0001@users.noreply.github.com> Date: Wed, 31 Jan 2024 21:03:27 -0500 Subject: [PATCH] setup ci --- .github/dependabot.yml | 7 ------- .github/workflows/ci.yml | 10 +++++----- .github/workflows/npm-publish.yml | 32 ------------------------------- lib/movements.js | 11 +++++++++-- 4 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 4872c5a..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9435c1..7aa8f95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: build: @@ -16,10 +16,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install - - run: npm test \ No newline at end of file + - run: npm test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index b41b7a3..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: npm-publish -on: - push: - branches: - - master # Change this to your default branch -jobs: - npm-publish: - name: npm-publish - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@master - - name: Set up Node.js - uses: actions/setup-node@master - with: - node-version: 14.0.0 - - id: publish - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_AUTH_TOKEN }} - - name: Create Release - if: steps.publish.outputs.type != 'none' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.publish.outputs.version }} - release_name: Release ${{ steps.publish.outputs.version }} - body: ${{ steps.publish.outputs.version }} - draft: false - prerelease: false diff --git a/lib/movements.js b/lib/movements.js index cb2fafc..239fd54 100644 --- a/lib/movements.js +++ b/lib/movements.js @@ -330,7 +330,15 @@ class Movements { toBreak.push(blockD.position) } cost += this.exclusionPlace(blockD) - toPlace.push({ x: node.x, y: node.y - 1, z: node.z, dx: dir.x, dy: 0, dz: dir.z, returnPos: new Vec3(node.x, node.y, node.z) }) + toPlace.push({ + x: node.x, + y: node.y - 1, + z: node.z, + dx: dir.x, + dy: 0, + dz: dir.z, + returnPos: new Vec3(node.x, node.y, node.z) + }) cost += this.placeCost // additional cost for placing a block } @@ -646,7 +654,6 @@ class Movements { // | // dy - // modifications to be made: // prefer nodes which continue the current direction getNeighbors (node, currentXDirection) {