diff --git a/.github/workflows/static-assets-check.yml b/.github/workflows/static-assets-check.yml index bef46b2ed09..6591e0ce45d 100644 --- a/.github/workflows/static-assets-check.yml +++ b/.github/workflows/static-assets-check.yml @@ -13,12 +13,10 @@ jobs: strategy: matrix: os: [ubuntu-24.04] - python-version: - - "3.11" - node-version: [18, 20] - npm-version: [10.5.x] - mongo-version: - - "7.0" + python-version: [ '3.8', '3.11' ] + node-version: [ 18 ] + npm-version: [ 10.5.x ] + mongo-version: ["4.4", "7.0"] services: mongo: @@ -34,70 +32,55 @@ 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 "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: 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 + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + 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@v3 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} + restore-keys: ${{ runner.os }}-pip- + + - name: Install Required Python Dependencies + run: | + make base-requirements + + - 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: Run Static Assets Check + env: + LMS_CFG: lms/envs/minimal.yml + CMS_CFG: lms/envs/minimal.yml + + run: | + paver update_assets lms --theme-dirs ./themes + paver update_assets cms --theme-dirs ./themes \ No newline at end of file