Merge pull request #85 from jmtcsngr/fixmf #50
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: testing | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: ['14.8.0'] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l -e -o pipefail {0} | |
env: | |
NPM_CONFIG_PREFIX: "$HOME/.npm-global" | |
CONDA_HOME: "$HOME/conda" | |
CONDA_TEST_ENV: test-environment | |
name: Node ${{ matrix.node }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: "Install Miniforge" | |
run: | | |
CONDA_HOME=${{ env.CONDA_HOME }} ./scripts/install_miniforge.sh | |
echo 'source "${{ env.CONDA_HOME }}/etc/profile.d/conda.sh"' >> "$HOME/.bash_profile" | |
- name: "Cache Conda" | |
id: miniforgeCache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/conda/pkgs | |
~/conda/envs | |
key: ${{ runner.os }}-build-miniforge | |
- name: "Install Conda packages" | |
run: | | |
conda config --prepend pkgs_dirs ${{ env.CONDA_HOME }}/pkgs | |
conda config --prepend envs_dirs ${{ env.CONDA_HOME }}/envs | |
conda info | |
conda create -y -n "${{ env.CONDA_TEST_ENV }}" | |
conda install -y -n "${{ env.CONDA_TEST_ENV }}" nodejs=="${{ matrix.node }}" | |
- name: Run install scripts | |
run: | | |
conda activate "${{ env.CONDA_TEST_ENV }}" | |
mkdir -p "$NPM_CONFIG_PREFIX" | |
npm install -g bower grunt-cli node-qunit-phantomjs | |
npm install | |
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH" | |
bower install | |
- name: run script | |
run: | | |
conda activate "${{ env.CONDA_TEST_ENV }}" | |
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH" | |
conda info --envs | |
${GITHUB_WORKSPACE}/scripts/script.sh |