Add new regression data download method and update github actions ubuntu version #377
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: test-suite | |
on: [pull_request] | |
env: | |
db_password: "postgres" | |
db_port: "5432" | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: ["3.8.12", "3.9.10", "3.10.2"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create dev database | |
uses: ./.github/actions/create-dev-database | |
with: | |
db_password: ${{ env.db_password }} | |
db_port: ${{ env.db_port }} | |
- name: Install dependencies | |
run: sudo apt-get install -y libpq-dev libgraphviz-dev | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: cache poetry install | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local | |
key: poetry-1.1.12-0 | |
- uses: snok/install-poetry@v1 | |
with: | |
version: 1.1.12 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "12" | |
- name: Set up frontend assets and install python dependencies | |
run: | | |
npm ci | |
npm start | |
poetry install --no-interaction | |
- name: Set DATABASE_URL (using ansible) | |
run: > | |
cp webinterface/.env.template webinterface/.env && | |
ansible localhost | |
-m lineinfile | |
-a " | |
path=webinterface/.env | |
regex=^DATABASE_URL | |
line='DATABASE_URL=psql://vast:vastpsw@localhost:${{ env.db_port }}/vastdb' | |
" | |
- name: Create database user and database name | |
run: > | |
python ./init-tools/init-db.py | |
localhost ${{ env.db_port }} | |
postgres ${{ env.db_password }} | |
vast vastpsw vastdb | |
- name: Make relevant directories | |
run: mkdir pipeline-runs | |
- name: Download regression test data | |
run: bash -e ./download.sh | |
working-directory: ./vast_pipeline/tests/regression-data | |
- name: Run tests | |
run: ./manage.py test |