From 798319feae00e5384b648dd0243cce6fae68c59b Mon Sep 17 00:00:00 2001 From: Steve Breker Date: Wed, 16 Oct 2024 11:15:22 -0700 Subject: [PATCH] Reorder AtoM Github action steps --- .github/workflows/oidc-integration-test.yml | 45 +++++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/oidc-integration-test.yml b/.github/workflows/oidc-integration-test.yml index 0cc89ec33e..fcc63f3f06 100644 --- a/.github/workflows/oidc-integration-test.yml +++ b/.github/workflows/oidc-integration-test.yml @@ -19,15 +19,19 @@ jobs: steps: - name: Check out code uses: actions/checkout@v3 + - name: Start containerized services run: | sudo sysctl -w vm.max_map_count=262144 docker compose -p ci up -d percona elasticsearch gearmand + - name: Set CI-specific Realm File run: echo "REALM_FILE=../test/etc/keycloak/realm.json" >> $GITHUB_ENV + - name: Launch Keycloak service run: | docker compose -p ci -f ${{ github.workspace }}/docker/docker-compose.keycloak.yml up -d + - name: Wait for Keycloak to be Ready run: | echo "Waiting for Keycloak to be ready..." @@ -39,23 +43,28 @@ jobs: echo "Waiting for Keycloak..." sleep 5 done + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: 7.4 coverage: none extensions: apcu, opcache + - name: Setup PHP-FPM run: | sudo apt install php7.4-fpm sudo service php7.4-fpm start + - name: Cache Composer dependencies uses: actions/cache@v3 with: path: ~/.composer/cache/files key: 20.04-7.4-composer-${{ hashFiles('composer.lock') }} + - name: Install Composer dependencies run: composer install + - name: Cache NPM dependencies uses: actions/cache@v3 with: @@ -63,18 +72,22 @@ jobs: ~/.npm ~/.cache/Cypress key: npm-${{ hashFiles('package-lock.json') }} + - name: Install NPM dependencies run: sudo npm install -g npm && npm ci + - name: Modify Gearman config run: | echo -e "all:\n servers:\n default: 127.0.0.1:63005" \ > apps/qubit/config/gearman.yml + - name: Build themes run: | sudo npm install -g "less@<4.0.0" make -C plugins/arDominionPlugin make -C plugins/arArchivesCanadaPlugin npm run build + - name: Run the installer run: | php symfony tools:install \ @@ -88,19 +101,7 @@ jobs: --search-index=atom \ --demo \ --no-confirmation - - name: Update OIDC plugin app.yml file - run: sudo cp test/etc/oidc/arOidcPlugin/config/app.yml plugins/arOidcPlugin/config - - name: Update factories.yml to use oidcUser - run: | - sudo sed -i 's/class: myUser/class: oidcUser/' config/factories.yml - - name: Install OIDC Plugin - run: | - php symfony tools:atom-plugins add arOidcPlugin - - name: Clear Symfony cache - run: | - php symfony cc - - name: Change filesystem permissions - run: sudo chown -R www-data:www-data ${{ github.workspace }} + - name: Start application services run: | sudo cp test/etc/fpm_conf /etc/php/7.4/fpm/pool.d/atom.conf @@ -120,6 +121,24 @@ jobs: sudo nginx -t sudo systemctl restart nginx + - name: Update OIDC plugin app.yml file + run: sudo cp test/etc/oidc/arOidcPlugin/config/app.yml plugins/arOidcPlugin/config + + - name: Update factories.yml to use oidcUser + run: | + sudo sed -i 's/class: myUser/class: oidcUser/' config/factories.yml + + - name: Install OIDC Plugin + run: | + php symfony tools:atom-plugins add arOidcPlugin + + - name: Clear Symfony cache + run: | + php symfony cc + + - name: Change filesystem permissions + run: sudo chown -R www-data:www-data ${{ github.workspace }} + - name: Create writable Cypress videos and screenshots dirs run: | sudo mkdir -p ${{ github.workspace }}/cypress/screenshots ${{ github.workspace }}/cypress/videos