Merge pull request #233 from NFDI4Energy/231--Description-value-is-no… #489
Workflow file for this run
This file contains hidden or 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: CI Pipeline | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
CI_PERSONAL_TOKEN_KEY_GL: ${{ secrets.CI_PERSONAL_TOKEN_KEY_GL }} | |
GL_URL: ${{ vars.GL_URL }} | |
CI_PERSONAL_TOKEN_KEY_GH: ${{ secrets.CI_PERSONAL_TOKEN_KEY_GH }} | |
GH_URL: ${{ vars.GH_URL }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Cache pip dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m venv env | |
source env/bin/activate | |
pip install -r requirements.txt | |
- name: Run server | |
run: | | |
source env/bin/activate | |
python manage.py runserver 0.0.0.0:8000 & | |
env: | |
CI_PERSONAL_TOKEN_KEY_GL: ${{ secrets.CI_PERSONAL_TOKEN_KEY_GL }} | |
GL_URL: ${{ vars.GL_URL }} | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
CI_PERSONAL_TOKEN_KEY_GL: ${{ secrets.CI_PERSONAL_TOKEN_KEY_GL }} | |
GL_URL: ${{ vars.GL_URL }} | |
CI_PERSONAL_TOKEN_KEY_GH: ${{ secrets.CI_PERSONAL_TOKEN_KEY_GH }} | |
GH_URL: ${{ vars.GH_URL }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m venv env | |
source env/bin/activate | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
source env/bin/activate | |
echo "$GL_URL" | |
echo "$GH_URL" | |
python manage.py test tests |