Skip to content

Commit

Permalink
Merge pull request #14 from rokucommunity/unit-tests
Browse files Browse the repository at this point in the history
Add self-hosted runner logic and dummy test
  • Loading branch information
TwitchBronBron committed Dec 13, 2023
2 parents 674aa38 + 2525fe5 commit 5a5a2a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Expand Up @@ -6,17 +6,26 @@ on:
tags:
- v*
pull_request:
env:
NODE_VERSION: "18.15.0"

jobs:
ci:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "18.15.0"
- run: npm ci
node-version: ${{ env.NODE_VERSION }}
- name: Load local npm cache for node ${{ env.NODE_VERSION }}
uses: MasterworksIO/action-local-cache@2
with:
strategy: move
path: .npm
key: ${{ env.NODE_VERSION }}
- run: npm ci --cache .npm
- run: npm run build
- run: npm run test
npm-release:
#only run this task for version-tagged releases
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -35,7 +44,7 @@ jobs:
# Make the promises.zip, remove promises_ prefix in prep for ropm publishing
- name: Build project, prepare github release, prepare for npm/ropm release
run: npm run prepare-releases

#create GitHub release
- name: Create GitHub Release
id: create_release
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"preversion": "npm run build",
"build": "bsc --create-package=false",
"test": "echo it works 3!",
"prepare-releases": "npx ts-node ./scripts/prepare-releases.ts"
},
"devDependencies": {
Expand Down

0 comments on commit 5a5a2a4

Please sign in to comment.