Update the workflow file for nvm issue #98
Workflow file for this run
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: on-pr-into-main | |
env: | |
NVM_VERSION: 0.39.7 | |
NODE_VERSION: 16.14.0 | |
PYTHON_VERSION: 3.9 | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run-pr-checks: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install a specific nvm version | |
run: | | |
rm -rf $NVM_DIR | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${{ env.NVM_VERSION }}/install.sh | bash | |
cat ~/.bashrc | grep "NVM" > ~/.non-interactive | |
- name: Install a specific node version | |
run: | | |
source ~/.non-interactive | |
echo "NVM Version: $(nvm --version)" | |
nvm install ${{ env.NODE_VERSION }} | |
nvm use ${{ env.NODE_VERSION }} | |
nvm alias default ${{ env.NODE_VERSION }} | |
- name: Install and upgrade pre-requisites | |
run: | | |
python3.9 -m pip install --upgrade pip wheel setuptools | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev | |
sudo apt-get install -y libssl-dev | |
- name: Bootstrap Python app and run tests | |
run: | | |
source ~/.non-interactive | |
export ENVIRONMENT='local' | |
set -eu | |
make bootstrap-for-tests | |
make test |