diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..16d6f93 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,56 @@ +name: Django # workflow name + +on: + push: + branches: # similar to "only" in GitLab + - main + +jobs: + build: + runs-on: ubuntu-20.04 # similar to "image" in GitLab + steps: + - uses: actions/checkout@v2 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.6' + + - run: | + pip3 install --upgrade virtualenv + virtualenv env + source env/bin/activate + pip install -r requirements.txt + python manage.py check + + test: + runs-on: ubuntu-20.04 + needs: build + steps: + - uses: actions/checkout@v2 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.6' + + - run: | + pip3 install --upgrade virtualenv + virtualenv env + source env/bin/activate + pip install -r requirements.txt + python manage.py test taskManager + + integration: + runs-on: ubuntu-20.04 + needs: test + steps: + - run: echo "This is an integration step" + - run: exit 1 + continue-on-error: true + + prod: + runs-on: ubuntu-20.04 + needs: integration + steps: + - run: echo "This is a deploy step."