Skip to content

docs(lxd): format test config #265

docs(lxd): format test config

docs(lxd): format test config #265

Workflow file for this run

# This workflow will do a clean install of node dependencies, 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: Nikita CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
list-packages:
name: List Packages
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.get-folders.outputs.packages }}
steps:
- uses: actions/checkout@v3
- id: get-folders
working-directory: packages
shell: bash
run: |
packages=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name)')
echo "packages=$packages" >> $GITHUB_OUTPUT
test:
name: Package Test
needs: [list-packages]
runs-on: ubuntu-22.04
strategy:
fail-fast: false # avoid cancel all in-progress jobs if any fails
matrix:
node-version: [18.x]
package: ${{ fromJson(needs.list-packages.outputs.packages)}}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup SSH
run: |
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
cat ~/.ssh/id_ed25519.pub > ~/.ssh/authorized_keys
- name: Install external dependencies
run: |
script=.github/CI_DEPENDENCIES/${{ matrix.package }}.sh
test -f $script && bash $script || echo "No external dependencies script available"
- name: Install package dependencies
run: yarn --frozen-lockfile
- name: Test
shell: bash
run: |
if [ ${{ matrix.package }} != nikita ]; then
npx lerna run test:local --scope=@nikitajs/${{ matrix.package }}
else
npx lerna run test:local --scope=${{ matrix.package }}
fi
# deploy:
# needs: test
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [14.x]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: 'https://registry.npmjs.org'
# - run: yarn --frozen-lockfile
# - run: yarn run publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
www:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn --frozen-lockfile
- run: cd docs/website && yarn install && yarn build
- run: echo 'nikita.js.org' > docs/website/public/CNAME
- name: Deploy
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\
# REPOSITORY_NAME: adaltas/node-nikita-docs
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/website/public # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch