Skip to content

abm3 v15.2.1 updates #45

abm3 v15.2.1 updates

abm3 v15.2.1 updates #45

Workflow file for this run

name: Implementation Testing
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
foundation:
strategy:
matrix:
python-version: ["3.10"]
defaults:
run:
shell: bash -l {0}
name: linux-64-py${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
# checkout the code in this repository
- uses: actions/checkout@v4
with:
path: 'activitysim-sandag-abm3'
# checkout the main branch of ActivitySim itself
- uses: actions/checkout@v4
with:
repository: 'ActivitySim/activitysim'
ref: main
path: 'activitysim'
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ matrix.python-version }}
- name: Set cache date for year and month
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: miniconda3/envs/asim-test
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
run: |
conda env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Install activitysim
# installing without dependencies is faster, we trust that all needed dependencies
# are in the conda environment defined above. Also, this avoids pip getting
# confused and reinstalling tables (pytables).
run: |
python -m pip install ./activitysim --no-deps
- name: Conda checkup
run: |
conda info -a
conda list
- name: Test this implementation
run: |
cd activitysim-sandag-abm3/test
python -m pytest test_sandag_abm3.py::test_sandag_abm3_progressive