Skip to content

Removed the unnecessary dist/ directory cleaning during the "deploy-i… #79

Removed the unnecessary dist/ directory cleaning during the "deploy-i…

Removed the unnecessary dist/ directory cleaning during the "deploy-i… #79

Workflow file for this run

name: Build
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
packages: read
env:
DRAKY_IMAGE_PATH: 'dist/draky-local-build.image.tar'
DRAKY_IMAGE_ARTIFACT_NAME: 'draky-image'
DRAKY_DRAKY_PATH: dist/bin/draky
DRAKY_DRAKY_ARTIFACT_NAME: 'draky'
jobs:
build:
name: Building draky.
runs-on: ubuntu-latest
container:
image: docker:24.0.2-dind-alpine3.18
steps:
- name: checkout repo
uses: actions/[email protected]
- name: Installing basic dependencies.
run: apk add make bash
- name: Install other dependencies.
run: make install_build_dependencies_alpine
- name: Building.
run: make build
- name: Preserve image
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_IMAGE_ARTIFACT_NAME }}
path: ${{ env.DRAKY_IMAGE_PATH }}
retention-days: 1
- name: Preserve draky
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_DRAKY_ARTIFACT_NAME }}
path: ${{ env.DRAKY_DRAKY_PATH }}
retention-days: 1
test-core:
name: Testing draky-core.
runs-on: ubuntu-latest
needs: [build]
steps:
- name: checkout repo
uses: actions/[email protected]
- name: Installing basic dependencies.
run: sudo apt install make
- name: Retrieve saved Docker image
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_IMAGE_ARTIFACT_NAME }}
path: dist
- name: Loading image.
run: docker load --input $DRAKY_IMAGE_PATH
- name: Testing core.
run: make test-core
test-functional:
name: Testing functional.
runs-on: ubuntu-latest
needs: [build]
steps:
- name: checkout repo
uses: actions/[email protected]
- name: Installing basic dependencies.
run: sudo apt install make
- name: Retrieve saved Docker image
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_IMAGE_ARTIFACT_NAME }}
path: dist
- name: Retrieve saved draky script
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_DRAKY_ARTIFACT_NAME}}
path: dist/bin
- name: Making sure that draky script is executable.
run: chmod u+x ${{ env.DRAKY_DRAKY_PATH }}
- name: Loading image.
run: docker load --input $DRAKY_IMAGE_PATH
- name: Running functional tests.
run: make test-functional
test-lint:
name: Testing linting.
runs-on: ubuntu-latest
needs: [build]
steps:
- name: checkout repo
uses: actions/[email protected]
- name: Installing basic dependencies.
run: sudo apt install make
- name: Retrieve saved Docker image
uses: actions/[email protected]
with:
name: ${{ env.DRAKY_IMAGE_ARTIFACT_NAME }}
path: dist
- name: Loading image.
run: docker load --input $DRAKY_IMAGE_PATH
- name: Running linter.
run: sudo make test-lint