Skip to content

Commit

Permalink
Simplify github workflow actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Sep 6, 2023
1 parent f58e4af commit 3fe3498
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/test_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,15 @@ jobs:
- name: Set up services
run: docker-compose up -d --remove-orphans
- name: Create conda env
uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-micromamba
uses: mamba-org/setup-micromamba@v1
with:
activate-environment: freva-web
environment-name: freva-web
environment-file: conda-env.yml
python-version: "3.11"
auto-activate-base: false
- name: Run checks in python
run: make tests
- name: Lint python
run: make lint
- name: Prepare node
run: npm install
- name: Lint js formatting
run: npm run lint-format
- name: Lint javascript
run: npm run lint
- name: Test building the prod system
run: npm run build-production
- name: Test building the dev system
run: npm run build
cache-environment: false
cache-downloads: false
init-shell: bash
- name: Lint js code and python
run: micromamba run -n freva-web make lint
- name: Run build checks for js and python smoke tests
run: micromamba run -n freva-web make tests
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ setup-django:
setup-node:
npm install


runserver:
@echo "Starting Django development server..."
python manage.py runserver > runserver.log 2>&1 &
Expand Down Expand Up @@ -51,9 +50,13 @@ setup: setup-node setup-django dummy-data

run: runfrontend runserver

lint:
lint: setup-node
npm run lint-format
npm run lint
black -t py310 --check .

tests:
tests: setup-node
npm run build-production
npm run build
rm -rf node_modules
pytest -vv $(PWD) tests/

0 comments on commit 3fe3498

Please sign in to comment.