From e44fab0f7bbb07da1f11aa6491bd155f0d6a722b Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Thu, 5 Oct 2023 10:00:03 -0700 Subject: [PATCH] try prior CI tests --- .github/workflows/mega-linter.yml | 7 ++-- .github/workflows/pkg-test.yml | 61 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 16 ++++---- 3 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/pkg-test.yml diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 2a10ed4d..a58224a7 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -27,9 +27,9 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 with: - token: ${{ secrets.GITHUB_TOKEN }} # secrets.PAT || + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances # MegaLinter @@ -37,7 +37,7 @@ jobs: id: ml # You can override MegaLinter flavor used to have faster performances # More info at https://megalinter.github.io/flavors/ - uses: oxsecurity/megalinter/flavors/dotnet@v7.4.0 + uses: oxsecurity/megalinter/flavors/dotnet@v7.3.0 env: # All available variables are described in documentation # https://megalinter.github.io/configuration/ @@ -48,6 +48,7 @@ jobs: # Upload MegaLinter artifacts - name: Archive production artifacts + if: ${{ success() }} || ${{ failure() }} uses: actions/upload-artifact@v3 with: name: MegaLinter reports diff --git a/.github/workflows/pkg-test.yml b/.github/workflows/pkg-test.yml new file mode 100644 index 00000000..51317a7c --- /dev/null +++ b/.github/workflows/pkg-test.yml @@ -0,0 +1,61 @@ +name: Test + +on: + # Trigger at every push. Action will also be visible from Pull Requests to master + push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions) + pull_request: + branches: [master] + +permissions: read-all + +jobs: + build: + name: Package Test + permissions: + contents: read + id-token: write + issues: write + pull-requests: write + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + java_version: [19] + runs-on: ${{ matrix.os }} + + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: arn:aws:iam::712023778557:role/GitHub-Testing-NF-Quilt + aws-region: us-east-1 + + - name: Setup Java ${{matrix.java_version}} + uses: actions/setup-java@v3 + with: + java-version: ${{matrix.java_version}} + distribution: 'temurin' + architecture: x64 + cache: gradle + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Run Package Tests + run: make pkg-test + + - name: Archive production artifacts + if: ${{ success() }} || ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: nf-quilt-pkg-test + path: | + /home/runner/work/nf-quilt/nf-quilt/plugins/nf-quilt/build/reports/tests/test/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 809d703d..4f3a22e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,8 +12,8 @@ jobs: build: name: Test permissions: - # contents: read - # id-token: write + contents: read + id-token: write issues: write pull-requests: write @@ -27,17 +27,16 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 with: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - - name: Install Quilt3 - uses: actions/setup-python@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v3 with: - python-version: '3.10' - - run: python -m pip install quilt3 - - run: which quilt3 + role-to-assume: arn:aws:iam::712023778557:role/GitHub-Testing-NF-Quilt + aws-region: us-east-1 - name: Setup Java ${{matrix.java_version}} uses: actions/setup-java@v3 @@ -54,6 +53,7 @@ jobs: run: make test - name: Archive production artifacts + if: ${{ success() }} || ${{ failure() }} uses: actions/upload-artifact@v3 with: name: nf-quilt-test-reports