From 4437ff79b0c0390f0291f3a1f1224919fc68b1d7 Mon Sep 17 00:00:00 2001 From: Petr Jasek Date: Thu, 14 Nov 2024 12:53:50 +0100 Subject: [PATCH] use reusable workflows --- .github/workflows/lint.yml | 33 ---------------------- .github/workflows/tests.yml | 56 ++----------------------------------- 2 files changed, 3 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a8c0587c6..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Lint" - -on: [push, pull_request] - -defaults: - run: - working-directory: server - -jobs: - - black: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - run: pip install black - - run: black --diff . - - flake8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - run: pip install flake8 - - run: flake8 - - mypy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - - run: pip install mypy - - run: mypy . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8bdeec035..4fefe38fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,60 +5,10 @@ on: [push, pull_request] jobs: server: - - strategy: - matrix: - python-version: ['3.10'] - - runs-on: ubuntu-latest - - defaults: - run: - working-directory: server - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - run: | - sudo apt-get update - sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl libexempi-dev - - - run: | - python -m pip install --upgrade pip wheel setuptools - python -m pip install -r dev-requirements.txt + uses: petrjasek/superdesk/.github/workflows/server.yml@chore-reusable-github-workflows client: + uses: petrjasek/superdesk/.github/workflows/client.yml@chore-reusable-github-workflows - strategy: - matrix: - node-version: ['12.x', '14.x'] - - runs-on: ubuntu-latest - - defaults: - run: - working-directory: client - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - - run: npm run build - docker: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - run: docker compose build + uses: petrjasek/superdesk/.github/workflows/docker.yml@chore-reusable-github-workflows