diff --git a/.github/workflows/static-assets-check.yml b/.github/workflows/static-assets-check.yml index 09307145be3..3c5df9becfa 100644 --- a/.github/workflows/static-assets-check.yml +++ b/.github/workflows/static-assets-check.yml @@ -12,11 +12,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ubuntu-latest] python-version: - - '3.11' - node-version: [ 18 ] - npm-version: [ 10.5.x ] + - "3.11" + node-version: [18, 20] + npm-version: [10.5.x] mongo-version: - "7.0" @@ -34,73 +34,73 @@ jobs: --health-retries 3 steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install system Packages - run: | - sudo apt-get update - sudo apt-get install libxmlsec1-dev pkg-config - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Setup npm - run: npm i -g npm@${{ matrix.npm-version }} - - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} - restore-keys: ${{ runner.os }}-pip- - - - name: Install Limited Python Deps for Build - run: | - pip install -r requirements/edx/assets.txt - - - name: Initiate Mongo DB Service - run: sudo systemctl start mongod - - - name: Add node_modules bin to $Path - run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH - - - name: Check Dev Assets Build - env: - COMPREHENSIVE_THEMES_DIR: ./themes - run: | - npm clean-install --dev - npm run build-dev - - - name: Check Prod Assets Build - env: - COMPREHENSIVE_THEMES_DIR: ./themes - run: | - npm clean-install - npm run build - - - name: Install Full Python Deps for Collection - run: | - pip install -r requirements/edx/base.txt -e . - - - name: Check Assets Collection - env: - LMS_CFG: lms/envs/minimal.yml - CMS_CFG: lms/envs/minimal.yml - DJANGO_SETTINGS_MODULE: lms.envs.production - run: | - ./manage.py lms collectstatic --noinput - ./manage.py cms collectstatic --noinput + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install system Packages + run: | + sudo apt-get update + sudo apt-get install libxmlsec1-dev pkg-config + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Setup npm + run: npm i -g npm@${{ matrix.npm-version }} + + - name: Get pip cache dir + id: pip-cache-dir + run: | + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + + - name: Cache pip dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} + restore-keys: ${{ runner.os }}-pip- + + - name: Install Limited Python Deps for Build + run: | + pip install -r requirements/edx/assets.txt + + - name: Initiate Mongo DB Service + run: sudo systemctl start mongod + + - name: Add node_modules bin to $Path + run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH + + - name: Check Dev Assets Build + env: + COMPREHENSIVE_THEMES_DIR: ./themes + run: | + npm clean-install --dev + npm run build-dev + + - name: Check Prod Assets Build + env: + COMPREHENSIVE_THEMES_DIR: ./themes + run: | + npm clean-install + npm run build + + - name: Install Full Python Deps for Collection + run: | + pip install -r requirements/edx/base.txt -e . + + - name: Check Assets Collection + env: + LMS_CFG: lms/envs/minimal.yml + CMS_CFG: lms/envs/minimal.yml + DJANGO_SETTINGS_MODULE: lms.envs.production + run: | + ./manage.py lms collectstatic --noinput + ./manage.py cms collectstatic --noinput \ No newline at end of file