Migrate project to KotlinJS #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: proxy-web-check | |
on: | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'proxy-web/**' | |
env: | |
JAVA_VERSION: "15" | |
JAVA_DISTRIBUTION: "zulu" | |
GCP_SA_KEY_INFRA: ${{ secrets.GCP_SA_KEY_INFRA }} | |
jobs: | |
proxy-web-check-build: | |
runs-on: ubuntu-20.04 | |
concurrency: | |
group: ${{ github.ref }}-proxy-web-check-build | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v3 # By default, cache is only saved on the 'master' branch | |
- name: Set up secrets | |
run: | | |
echo "$GCP_SA_KEY_INFRA" >> ./proxy-web/infra/credentials-gcp-infra.json | |
- name: Build project | |
run: | | |
set -o pipefail && | |
cd proxy-web && | |
./gradlew --no-daemon assemble && | |
cd .. | |
- name: Build container images | |
run: | | |
set -o pipefail && | |
docker compose -f docker/proxy-web-compose.yaml build | |
- name: Preview infrastructure | |
uses: pulumi/actions@v5 | |
with: | |
command: preview | |
stack-name: prod | |
work-dir: proxy-web/infra | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- name: Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() # Ensure all artifacts are collected, even after errors | |
with: | |
name: Build | |
path: | | |
**/build | |
proxy-web/infra | |
proxy-web-check-test: | |
runs-on: ubuntu-20.04 | |
concurrency: | |
group: ${{ github.ref }}-proxy-web-check-test | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v3 # By default, cache is only saved on the 'master' branch | |
- name: Set up secrets | |
run: | | |
echo "$GCP_SA_KEY_INFRA" >> ./proxy-web/infra/credentials-gcp-infra.json | |
- name: Test | |
run: | | |
set -o pipefail && | |
cd proxy-web && | |
./gradlew --no-daemon --continue jsTest && | |
cd .. | |
- name: Generate test report | |
uses: mikepenz/action-junit-report@v4 | |
if: always() # Ensure all test reports are collected, even after errors | |
with: | |
report_paths: '**/build/test-results/**/TEST-*.xml' | |
check_name: 'proxy-web-check-test-results' | |
- name: Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() # Ensure all artifacts are collected, even after errors | |
with: | |
name: Tests | |
path: '**/build/test-results/**/TEST-*.xml' |