diff options
author | Jason Karns <jason.karns@gmail.com> | 2023-02-24 16:12:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 16:12:08 +0300 |
commit | 44913ffe6020d1561c4c4d1e26cda8e07a1f374f (patch) | |
tree | 636c4449068d49c89b45648d43af18d50a327338 | |
parent | 2268cf976196c91f6f9399e67d20aad0075c6cb9 (diff) | |
parent | effe6f58f839404f5935154b28565d0c4adf6977 (diff) |
Merge pull request #58 from bats-core/workflow
Reuse shared test workflow
-rw-r--r-- | .github/workflows/test.yml | 9 | ||||
-rw-r--r-- | .github/workflows/tests.yml | 26 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | package-lock.json | 36 | ||||
-rw-r--r-- | test/test_helper.bash | 1 |
5 files changed, 46 insertions, 27 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6c95ce2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,9 @@ +name: Test +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test: + uses: bats-core/.github/.github/workflows/test.yml@v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index ad332f0..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Tests - -on: - push: - workflow_dispatch: - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - run: npm install - - run: BATS_LIB_PATH="$PWD/node_modules" npm test @@ -1,4 +1,3 @@ /node_modules -/package-lock.json /yarn.lock /bats-assert-*.tgz diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8f0dcc6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,36 @@ +{ + "name": "bats-assert", + "version": "2.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bats-assert", + "version": "2.1.0", + "license": "CC0-1.0", + "devDependencies": { + "bats": "^1", + "bats-support": "^0.3" + }, + "peerDependencies": { + "bats": "0.4 || ^1", + "bats-support": "^0.3" + } + }, + "node_modules/bats": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/bats/-/bats-1.9.0.tgz", + "integrity": "sha512-Z5BJaAmmHv/ujj7obhjEzJ//OL+ZtjVq0iRnHu+2fE9OeUaPMbJpBgYiOdNbDrG3E2hqe84/AXNnS/UiXl/UcA==", + "dev": true, + "bin": { + "bats": "bin/bats" + } + }, + "node_modules/bats-support": { + "version": "0.3.0", + "resolved": "git+ssh://git@github.com/jasonkarns/bats-support.git#24a72e14349690bcbf7c151b9d2d1cdd32d36eb1", + "integrity": "sha512-42f2THEaN02dVj7Zhj0C4AM5FdePq3YPlXvnu/fKUQwCv1qM2dyACBKFXQkLw9QMzhDmwuFcke90XwHMUsBjGQ==", + "dev": true + } + } +} diff --git a/test/test_helper.bash b/test/test_helper.bash index beb9298..8d476a8 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -1,4 +1,5 @@ # Load dependencies. +BATS_LIB_PATH=$PWD/node_modules:${BATS_LIB_PATH-} bats_load_library 'bats-support' # Load library. |