From 675d7b7778f37b0b58f3dc0eafc7b2b70938699a Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 23 Sep 2022 15:21:43 +0200 Subject: [PATCH] CI: Naming steps. --- .github/workflows/build.yml | 17 ++--------------- .github/workflows/deploy.yml | 11 +++++------ requirements.txt | 4 ++++ 3 files changed, 11 insertions(+), 21 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6205e51..6d327ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,21 +5,8 @@ name: Publish on: [push] jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: test - run: | - python -m pip install pytest hypothesis django - make -C python-initiation test - make -C python-avance test - # TODO: The following needs a configured Django: - # make -C drf-initiation test - # make -C django-initiation test - - build_and_publish: - needs: test + publish: + name: ${{ matrix.directory }} strategy: matrix: directory: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1767d96..0937bd1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,16 +12,17 @@ on: known_hosts: required: true jobs: - build_and_publish: + publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.10' - - run: | - sudo apt-get install -y cutycapt - - name: Build and Publish + cache: pip + - run: sudo apt-get install -y cutycapt + - run: make -C ${{ inputs.directory }} test + - name: Publish env: deploy_key: ${{secrets.deploy_key}} known_hosts: ${{secrets.known_hosts}} @@ -35,7 +36,5 @@ jobs: ssh-add rm ${HOME}/.ssh/id_ed25519 export deploy_key="" - python3 -m pip install --user --upgrade pip - python3 -m pip install --user mdtoreveal export PATH="$HOME/.local/bin/:$PATH" make -C ${{ inputs.directory }} rsync diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2477e0f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +pytest +hypothesis +mdtoreveal +django