diff --git a/.github/actions/install_asciidoctor/action.yml b/.github/actions/install_asciidoctor/action.yml new file mode 100644 index 00000000..1dae4ede --- /dev/null +++ b/.github/actions/install_asciidoctor/action.yml @@ -0,0 +1,10 @@ +name: install_asciidoctor +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Install asciidoctor + run: |- + sudo apt-get update + sudo apt install -y asciidoctor + shell: bash \ No newline at end of file diff --git a/.github/actions/install_java17/action.yml b/.github/actions/install_java17/action.yml new file mode 100644 index 00000000..7131a96d --- /dev/null +++ b/.github/actions/install_java17/action.yml @@ -0,0 +1,16 @@ +name: install_java17 +runs: + using: composite + steps: + - name: Install Java 17 + run: |- + sudo apt-get update + sudo apt install -y openjdk-17-jdk + sudo rm /etc/alternatives/java + sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java + shell: bash + - name: Install html2text + run: |- + sudo apt-get update + sudo apt-get install -y html2text + shell: bash \ No newline at end of file diff --git a/.github/actions/mvn_jar_deploy/action.yml b/.github/actions/mvn_jar_deploy/action.yml new file mode 100644 index 00000000..1d46384b --- /dev/null +++ b/.github/actions/mvn_jar_deploy/action.yml @@ -0,0 +1,22 @@ +name: mvn_jar_deploy +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Adjust pom version + run: ".circleci/adjust-pom-version.sh" + shell: bash + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Run Maven Jar Deploy + run: mvn -s .circleci/mvn-settings.xml -T4 flatten:flatten jar:jar deploy:deploy + shell: bash + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file diff --git a/.github/actions/mvn_verify/action.yml b/.github/actions/mvn_verify/action.yml new file mode 100644 index 00000000..a5f2e435 --- /dev/null +++ b/.github/actions/mvn_verify/action.yml @@ -0,0 +1,61 @@ +name: mvn_verify +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Write .env + run: echo "RDBMS_PASSWORD=$RDBMS_PASSWORD" >> qqq-sample-project/.env + shell: bash + - name: Run Maven Verify + run: mvn -s .circleci/mvn-settings.xml -T4 verify + shell: bash + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-core + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-filesystem + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-rdbms + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-javalin + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-picocli + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-slack + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-language-support-javascript + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-sample-project + - name: Save test results + run: |- + mkdir -p ~/test-results/junit/ + find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \; + if: always() + shell: bash + - uses: actions/upload-artifact@v4.1.0 + with: + path: "~/test-results" + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file diff --git a/.github/actions/run_asciidoctor/action.yml b/.github/actions/run_asciidoctor/action.yml new file mode 100644 index 00000000..4a13752f --- /dev/null +++ b/.github/actions/run_asciidoctor/action.yml @@ -0,0 +1,9 @@ +name: run_asciidoctor +runs: + using: composite + steps: + - name: Run asciidoctor + run: |- + cd docs + asciidoctor -a docinfo=shared index.adoc + shell: bash \ No newline at end of file diff --git a/.github/actions/store_jacoco_site/action.yml b/.github/actions/store_jacoco_site/action.yml new file mode 100644 index 00000000..3dbe2345 --- /dev/null +++ b/.github/actions/store_jacoco_site/action.yml @@ -0,0 +1,13 @@ +name: store_jacoco_site +inputs: + module: + required: false +runs: + using: composite + steps: + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/index.html" + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/jacoco-resources" \ No newline at end of file diff --git a/.github/actions/upload_docs_site/action.yml b/.github/actions/upload_docs_site/action.yml new file mode 100644 index 00000000..19043bfe --- /dev/null +++ b/.github/actions/upload_docs_site/action.yml @@ -0,0 +1,9 @@ +name: upload_docs_site +runs: + using: composite + steps: + - name: scp html to justinsgotskinnylegs.com + run: |- + cd docs + scp index.html dkelkhoff@45.79.44.221:/mnt/first-volume/dkelkhoff/nginx/html/justinsgotskinnylegs.com/qqq-docs.html + shell: bash \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..b3da8f11 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Kingsrook/qqq/deploy +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_deploy: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//(dev|integration.*)/' || github.ref == 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify" + - uses: "./.github/actions/mvn_jar_deploy" + publish_asciidoc: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//dev/' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_asciidoctor" + - uses: "./.github/actions/run_asciidoctor" + - uses: "./.github/actions/upload_docs_site" diff --git a/.github/workflows/test_only.yml b/.github/workflows/test_only.yml new file mode 100644 index 00000000..dd033a78 --- /dev/null +++ b/.github/workflows/test_only.yml @@ -0,0 +1,33 @@ +name: Kingsrook/qqq/test_only +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_test: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref != 'refs/heads//(dev|integration.*)/' && github.ref != 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify"