Fix action #163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: push | |
jobs: | |
test: | |
name: Test and lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install Node, NPM and Yarn | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install modules | |
run: | | |
yarn install --frozen-lockfile | |
- name: Build | |
run: | | |
yarn build:dist | |
- name: Lint | |
run: | | |
yarn lint | |
- name: Test | |
run: | | |
yarn test | |
- name: Test generate docs | |
run: | | |
yarn docs | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lib # A name for the artifact | |
path: ./lib # The path to the directory or file to upload | |
test-versions: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup nvm and use Node | |
run: | | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
nvm use system | |
npm uninstall -g a_module | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: lib # The name of the artifact to download | |
- name: Run Bash Script | |
run: | | |
test_versions |