diff --git a/.github/workflows/ci-node.yml b/.github/workflows/ci-node.yml new file mode 100644 index 000000000000..33e6f6b8f78f --- /dev/null +++ b/.github/workflows/ci-node.yml @@ -0,0 +1,34 @@ +name: CI - Node +on: + push: + branches: + - main + pull_request: +permissions: + contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true +jobs: + test: + strategy: + matrix: + include: + - name: Static Tests + command: bin/static_tests + - name: Static Lint + command: bin/static_lint + - name: Static Pipeline + command: bin/static_pipeline + name: ${{ matrix.name }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14.15.5 + cache: 'npm' + - name: Install Node dependencies + run: npm ci + - name: Run ${{ matrix.name }} + run: ${{ matrix.command }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-python.yml similarity index 56% rename from .github/workflows/ci.yml rename to .github/workflows/ci-python.yml index 0d660de54f2c..bcf1a2e66106 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-python.yml @@ -1,4 +1,4 @@ -name: CI +name: CI - Python on: push: branches: @@ -10,46 +10,44 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: + install: + runs-on: ubuntu-latest + name: Install Python Dependencies + steps: + - uses: actions/checkout@v3 + - name: Install platform dependencies + run: | + sudo apt -y update + sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config + - uses: actions/setup-python@v4 + with: + python-version-file: '.python-version' + cache: 'pip' + cache-dependency-path: | + requirements.txt + requirements/*.txt + - name: Install Python dependencies + run: | + pip install -U pip setuptools wheel + pip install -r requirements.txt --no-deps + pip install -r requirements/dev.txt test: + needs: install strategy: matrix: include: - name: Tests command: bin/tests --postgresql-host localhost - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Lint command: bin/lint - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Documentation command: bin/docs - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Dependencies command: bin/github-actions-deps - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Licenses command: bin/licenses - needs-python: ${{ true }} - needs-node: ${{ false }} - name: Translations command: bin/translations - needs-python: ${{ true }} - needs-node: ${{ false }} - - name: Static Tests - command: bin/static_tests - needs-python: ${{ false }} - needs-node: ${{ true }} - - name: Static Lint - command: bin/static_lint - needs-python: ${{ false }} - needs-node: ${{ true }} - - name: Static Pipeline - command: bin/static_pipeline - needs-python: ${{ false }} - needs-node: ${{ true }} runs-on: ubuntu-latest services: postgres: @@ -60,31 +58,16 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v3 - - name: Install platform dependencies - run: | - sudo apt -y update - sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config +# - name: Install platform dependencies +# run: | +# sudo apt -y update +# sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config - uses: actions/setup-python@v4 - if: ${{ matrix.needs-python }} with: python-version-file: '.python-version' cache: 'pip' cache-dependency-path: | requirements.txt requirements/*.txt - - name: Install Python dependencies - if: ${{ matrix.needs-python }} - run: | - pip install -U pip setuptools wheel - pip install -r requirements.txt --no-deps - pip install -r requirements/dev.txt - - uses: actions/setup-node@v3 - if: ${{ matrix.needs-node }} - with: - node-version: 14.15.5 - cache: 'npm' - - name: Install Node dependencies - if: ${{ matrix.needs-node }} - run: npm ci - name: Run ${{ matrix.name }} run: ${{ matrix.command }}