From a01250a7f0f08fc3842eefd874af3beeda3f573b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brostr=C3=B6m=2EA=20=7C=20Evul?= Date: Tue, 9 Jul 2024 13:20:16 +0200 Subject: [PATCH] Added prettier config and added fixed dubble testing (#1205) --- .editorconfig | 7 +++ .github/workflows/create_artifacts.yml | 1 + .github/workflows/deploy.yml | 4 +- .github/workflows/deploy_artifacts_main.yml | 7 ++- .github/workflows/deploy_artifacts_tag.yml | 7 ++- .github/workflows/testing.yml | 70 +++++++++++---------- 6 files changed, 55 insertions(+), 41 deletions(-) diff --git a/.editorconfig b/.editorconfig index af1c2ff31..207020fcf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,10 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false + +[*.sqf] +indent_style = space +indent_size = 4 + +[*.yml] +indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/create_artifacts.yml b/.github/workflows/create_artifacts.yml index a8d37599e..472195659 100644 --- a/.github/workflows/create_artifacts.yml +++ b/.github/workflows/create_artifacts.yml @@ -1,5 +1,6 @@ name: Create Artifacts on: workflow_dispatch + jobs: build: name: Create And Upload Releases diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b22ddd1e4..bed2e140e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,8 @@ name: Deploy Release on: release: - types: [ published ] + types: [published] + jobs: build: name: Create And Upload Release @@ -37,7 +38,6 @@ jobs: asset_name: cScripts_Debug-${{github.ref_name}}.zip file: release/cScripts_Debug-${{github.ref_name}}.zip - - name: Upload release (cScripts_NoRadio) uses: svenstaro/upload-release-action@v2 with: diff --git a/.github/workflows/deploy_artifacts_main.yml b/.github/workflows/deploy_artifacts_main.yml index 763b0b77e..b6eb41293 100644 --- a/.github/workflows/deploy_artifacts_main.yml +++ b/.github/workflows/deploy_artifacts_main.yml @@ -1,8 +1,9 @@ name: Deploy DevBuild Artifacts on: push: - branches: - - main + branches: + - main + jobs: build: name: Create And Upload Releases @@ -18,4 +19,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: cScripts_DevBuilds - path: release/* \ No newline at end of file + path: release/* diff --git a/.github/workflows/deploy_artifacts_tag.yml b/.github/workflows/deploy_artifacts_tag.yml index 59931c061..b4c7f214e 100644 --- a/.github/workflows/deploy_artifacts_tag.yml +++ b/.github/workflows/deploy_artifacts_tag.yml @@ -1,8 +1,9 @@ name: Deploy Tag Artifacts on: push: - tags: - - '*' + tags: + - "*" + jobs: build: name: Create And Upload Releases @@ -18,4 +19,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: cScripts_Releases - path: release/* \ No newline at end of file + path: release/* diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4d6b89dc6..8c7983d4f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,45 +1,49 @@ name: Testing -on: [push, pull_request] +on: + pull_request: + push: + branches: main + jobs: validate: runs-on: ubuntu-latest steps: - - name: Checkout the source code - uses: actions/checkout@master - - name: Validate SQF - run: python3 tools/sqf_validator.py - - name: Validate Config - run: python3 tools/config_style_checker.py - + - name: Checkout the source code + uses: actions/checkout@master + - name: Validate SQF + run: python3 tools/sqf_validator.py + - name: Validate Config + run: python3 tools/config_style_checker.py + lint: runs-on: ubuntu-latest steps: - - name: Checkout the source code - uses: actions/checkout@master - - name: Lint (sqflint) - uses: arma-actions/sqflint@master - with: - args: --exit e --directory cScripts/functions - continue-on-error: true # No failure due to many false-positives + - name: Checkout the source code + uses: actions/checkout@master + - name: Lint (sqflint) + uses: arma-actions/sqflint@master + with: + args: --exit e --directory cScripts/functions + continue-on-error: true # No failure due to many false-positives testing: runs-on: ubuntu-latest steps: - - name: Checkout the source code - uses: actions/checkout@master - - name: Check DEBUG_MODE - if: always() - run: bash tools/checkDebug.sh - - name: Check TODO - if: always() - run: bash tools/checkTodo.sh - continue-on-error: true - - name: Check for FIXME - if: always() - run: bash tools/checkFixme.sh - - name: Check for LOGGING - if: always() - run: bash tools/checkLogging.sh - - name: Check Pull Request Name - if: always() - run: bash tools/checkPullRequestTitle.sh ${{ github.event.pull_request.title }} \ No newline at end of file + - name: Checkout the source code + uses: actions/checkout@master + - name: Check DEBUG_MODE + if: always() + run: bash tools/checkDebug.sh + - name: Check TODO + if: always() + run: bash tools/checkTodo.sh + continue-on-error: true + - name: Check for FIXME + if: always() + run: bash tools/checkFixme.sh + - name: Check for LOGGING + if: always() + run: bash tools/checkLogging.sh + - name: Check Pull Request Name + if: always() + run: bash tools/checkPullRequestTitle.sh ${{ github.event.pull_request.title }}