Bump webpack-dev-middleware and react-scripts in /client #108
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: PR validation | |
on: | |
pull_request: | |
types: [synchronize, opened, reopened, edited] | |
branches: | |
- master | |
jobs: | |
reporting: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Report workflow details | |
run: | | |
echo "Repository ${{ github.repository }}." | |
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Report files updated in PR | |
run: | | |
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }} | |
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }} | |
test-api: | |
permissions: | |
id-token: write # Required for authentication through OIDC to AWS | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
- name: Install clojure and clojure cli (clj) | |
uses: DeLaGuardo/[email protected] | |
with: | |
cli: 1.10.1.536 | |
- name: Report runtime details | |
run: | | |
echo "Github runner OS: ${{ runner.os }}" | |
- name: AWS credentials configuration | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}} | |
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-test-api | |
aws-region: us-east-1 | |
mask-aws-account-id: true | |
- name: Download and install Datomic Pro | |
run: | | |
aws s3 cp s3://wormbase/datomic-pro/distro/datomic-pro-1.0.6165.zip ./ | |
unzip datomic-pro-1.0.6165.zip | |
cd datomic-pro-1.0.6165/ | |
bin/maven-install | |
- name: Generate pom file | |
run: | | |
clojure -Spom | |
- name: Run Integration tests | |
run: | | |
make run-tests APP_PROFILE=dev | |
build-and-run-container: | |
permissions: | |
id-token: write # Required for authentication through OIDC to AWS | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: AWS credentials configuration | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}} | |
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-test-api | |
aws-region: us-east-1 | |
mask-aws-account-id: true | |
- name: Build container image | |
run: | | |
make build-docker-image | |
- name: Launch test instance of container (connecting to test env DB) | |
run: | | |
make run-docker PROJ_NAME=wormbase-names-test | |
sleep 120 | |
- name: Test API accessability | |
id: test-api-accessability | |
continue-on-error: true | |
run: | | |
curl --no-progress-meter -I http://localhost:3000/api/auth/identity | |
- name: Test UI accessability | |
id: test-ui-accessability | |
continue-on-error: true | |
run: | | |
curl --no-progress-meter -I http://localhost:3000/ | |
- name: Report container logs if either accessibility test fails | |
if: ${{ steps.test-ui-accessability.outcome == 'failure' || steps.test-api-accessability.outcome == 'failure' }} | |
run: | | |
docker logs wormbase-names-test | |
- name: Report UI accessibility test failures | |
if: ${{ steps.test-ui-accessability.outcome == 'failure' }} | |
run: | | |
echo "UI accessability test step failed." | |
- name: Report API accessibility test failures | |
if: ${{ steps.test-api-accessability.outcome == 'failure' }} | |
run: | | |
echo "API accessability test step failed." | |
- name: Fail if either accessibility test fails | |
if: ${{ steps.test-ui-accessability.outcome == 'failure' || steps.test-api-accessability.outcome == 'failure' }} | |
run: | | |
exit 1 |