Skip to content

add github action for testing #15

add github action for testing

add github action for testing #15

Workflow file for this run

name: test

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml: Anchors are not currently supported. Remove the anchor 'install_deps_cmd'
on:
push:
branches: [ "*" ]
env:
artifact_name: test_project
jobs:
create-test-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: &install_deps_cmd |
sudo apt install cookiecutter pre-commit npm
pip install pipenv
npm install -g pnpm
- name: create project with cookiecutter
run: |
git config --global init.defaultBranch main
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
cookiecutter --no-input --output-dir /tmp ./ project_slug=github_test_project
- id: upload-artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: |
/tmp/github_test_project
!/tmp/github_test_project/**/node_modules
retention-days: 1
run-test-project:
runs-on: ubuntu-latest
needs: [ create-test-project ]
steps:
- name: install dependencies
run: *install_deps_cmd
- uses: actions/download-artifact@v4
with:
name: ${{ env.artifact_name }}
- run: ls
- name: manage.py --help
run: ./manage.py --help