Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
node-version: 18
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v4
with:
Expand Down
47 changes: 41 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,46 @@ name: publish
on:
push:
branches: [master, main]
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
publish:
runs-on: ubuntu-22.04
environment: production
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Comment thread
lucasparreira marked this conversation as resolved.
with:
node-version: 18
- name: Get yarn cache
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn --prefer-offline --frozen-lockfile --no-progress --non-interactive
- name: Build
run: yarn build
- name: Package
run: yarn package
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@e00cb83a68c1158b29afc5217dd0582cada6d172
with:
gpg_private_key: ${{ secrets.NEOBOT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit latest build artifacts
uses: endbug/add-and-commit@v7
with:
author_name: ${{ vars.NEOBOT_AUTHOR }}
author_email: ${{ vars.NEOBOT_AUTHOR_EMAIL }}
Comment thread
lucasparreira marked this conversation as resolved.
signoff: true
- uses: Saionaro/extract-package-version@de8268c348d3a9ed3514c86a9ad8d4568ab8b49e
id: extract_version
- uses: mathieudutour/github-tag-action@d745f2e74aaf1ee82e747b181f7a0967978abee0
Expand All @@ -16,7 +50,8 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.extract_version.outputs.version }}
coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
environment: production
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
Expand All @@ -25,7 +60,7 @@ jobs:
node-version: 18
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v4
with:
Expand All @@ -38,9 +73,9 @@ jobs:
- name: Test
run: yarn test
- name: Coverage
uses: neofinancial/coverage-upload-action@0ffd2ee97816db805bdedcca37bcac50b9521f37
uses: neofinancial/coverage-upload-action@v2
with:
coverageEndpoint: ${{ secrets.COVERAGE_ENDPOINT }}
coverageToken: ${{secrets.COVERAGE_TOKEN}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
18 changes: 2 additions & 16 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
node-version: 18
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
uses: actions/cache@v4
with:
Expand All @@ -38,18 +38,4 @@ jobs:
instance-dbName: validation
instance-port: 27018
instance-storageEngine: wiredTiger
mongoms-debug: 1
- name: Package
run: yarn package
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@e00cb83a68c1158b29afc5217dd0582cada6d172
with:
gpg_private_key: ${{ secrets.NEOBOT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit latest build artifacts
uses: endbug/add-and-commit@v7
with:
author_name: ${{ secrets.NEOBOT_AUTHOR }}
author_email: ${{ secrets.NEOBOT_AUTHOR_EMAIL }}
signoff: true
mongoms-debug: 1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The memory-server is stopped (and destroyed) subsequent to the completion of thi
### Testing

This repository's CI workflow has a 'validate' job @ `src/validate.ts` (technically, `build/validate.js`) for internal, CI-time testing of the action's functionality; this simply opens and closes a connection to the memory-server to ensure the validity of the provided ENV variable. There are also a small number of unit tests to ensure the memory-server's configuration values are passed to the memory-server appropriately.
If you're looking to reference this action before it's released, make sure to build it and commit the output manually. This step is automatic once the PR is merged to `master`.

- please try to cover the new capability when making small changes
- as necessary, add validation for variables passed directly to the initialization of the memory-server
Expand Down