From 74609c69efefe6660f0befb89928787fdceaa0ae Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 8 Jan 2024 17:40:00 +0200 Subject: [.github/dev-branch] Added initial setup --- .github/workflows/dev-branch.yml | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/dev-branch.yml (limited to '.github/workflows/dev-branch.yml') diff --git a/.github/workflows/dev-branch.yml b/.github/workflows/dev-branch.yml new file mode 100644 index 0000000..ba2853d --- /dev/null +++ b/.github/workflows/dev-branch.yml @@ -0,0 +1,85 @@ +name: Tests and static analysis +on: + push: + branches: + - dev +jobs: + # This is done to prevent potential race conditions; + # multiple jobs start with the source code, but since + # they have no "needs", one could start a little bit later, + # and in meantime a commit could be pushed + Clone-repo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/upload-artifact@v3 + with: + name: source-code + path: . + + Tests: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run tests + run: make tests + + Static-analysis: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run satic analysis + run: make static-analysis + + Security-analysis: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run security analysis + run: make security-analysis + + Build: + runs-on: ubuntu-latest + needs: [ Tests, Static-analysis, Security-analysis ] + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Build server and browser + run: make dev + - uses: actions/upload-artifact@v3 + with: + name: dev-build-files + path: ./build + + Build-docker-and-push: + name: Build the docker container image and push it to dockerhub + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: dev-build-files + path: ./build + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/build-push-action@v5 + with: + push: true + file: Dockerfile.dev + tags: ${{ secrets.DOCKERHUB_USERNAME }}/pico-web-dev:latest -- cgit v1.2.3 From a71a9c37a765cde78f0085b4c21adeedb6fd819f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 8 Jan 2024 17:48:26 +0200 Subject: [.github/dev-branch] Slight name rename --- .github/workflows/dev-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/dev-branch.yml') diff --git a/.github/workflows/dev-branch.yml b/.github/workflows/dev-branch.yml index ba2853d..a7e81f6 100644 --- a/.github/workflows/dev-branch.yml +++ b/.github/workflows/dev-branch.yml @@ -1,4 +1,4 @@ -name: Tests and static analysis +name: Tests, analysis and push to dev dockerhub on: push: branches: -- cgit v1.2.3 From fe29a3630d48d3e1d44287ea41682621d3a3dab0 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 8 Jan 2024 17:59:38 +0200 Subject: [.github] Recursive submodule checkout --- .github/workflows/dev-branch.yml | 2 ++ .github/workflows/feature-branch.yml | 2 ++ .github/workflows/main-branch.yml | 2 ++ 3 files changed, 6 insertions(+) (limited to '.github/workflows/dev-branch.yml') diff --git a/.github/workflows/dev-branch.yml b/.github/workflows/dev-branch.yml index a7e81f6..6d66da2 100644 --- a/.github/workflows/dev-branch.yml +++ b/.github/workflows/dev-branch.yml @@ -12,6 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: actions/upload-artifact@v3 with: name: source-code diff --git a/.github/workflows/feature-branch.yml b/.github/workflows/feature-branch.yml index 88bee04..3ff1833 100644 --- a/.github/workflows/feature-branch.yml +++ b/.github/workflows/feature-branch.yml @@ -13,6 +13,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: actions/upload-artifact@v3 with: name: source-code diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml index dcd4c60..8534344 100644 --- a/.github/workflows/main-branch.yml +++ b/.github/workflows/main-branch.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} -- cgit v1.2.3