ci: disable GitHub Pages deployment and mark repository as obsolete #528
Workflow file for this run
This file contains hidden or 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: CI/CD | |
| on: | |
| pull_request: # Runs whenever a pull request is created or updated (including from another fork) | |
| push: # Runs whenever a commit is pushed to the repository... | |
| branches: [main, master, develop, hotfix/*] # ...on any of these branches | |
| workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
| concurrency: | |
| group: "${{ github.workflow }} @ ${{ github.head_ref || github.ref }}" | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write # publish a GitHub release | |
| pages: write # deploy to GitHub Pages | |
| issues: write # comment on released issues | |
| pull-requests: write # comment on released pull requests | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| if: | | |
| (!( | |
| github.ref == 'refs/heads/develop' || | |
| github.ref == 'refs/heads/master' || | |
| github.ref == 'refs/heads/main' | |
| )) | |
| env: | |
| JEST_JUNIT_OUTPUT_DIR: test-results | |
| NODE_OPTIONS: --max-old-space-size=4000 | |
| steps: | |
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
| - uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4 | |
| with: | |
| cache: "npm" | |
| node-version-file: ".nvmrc" | |
| - name: Info | |
| run: | | |
| cat <<EOF | |
| Node version: $(node --version) | |
| NPM version: $(npm --version) | |
| GitHub ref: ${{ github.ref }} | |
| GitHub head ref: ${{ github.head_ref }} | |
| EOF | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build scratch-vm for smalruby | |
| run: npm run setup-scratch-vm | |
| - name: Lint | |
| run: npm run test:lint | |
| - name: Run Unit Tests | |
| env: | |
| JEST_JUNIT_OUTPUT_NAME: unit-results.xml | |
| JEST_JUNIT_OUTPUT_DIR: test-results/unit | |
| run: npm run test:unit -- --reporters="default" --reporters="jest-junit" --coverage --coverageReporters=text --coverageReporters=lcov --maxWorkers="2" | |
| - name: Store Test Results | |
| if: always() # Even if tests fail | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: test-output-unit | |
| path: ./test-results/* | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| DETECT_CHROMEDRIVER_VERSION: "true" | |
| JEST_JUNIT_OUTPUT_DIR: test-results | |
| NODE_OPTIONS: --max-old-space-size=4000 | |
| steps: | |
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
| - uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4 | |
| with: | |
| cache: "npm" | |
| node-version-file: ".nvmrc" | |
| - name: Info | |
| run: | | |
| cat <<EOF | |
| Node version: $(node --version) | |
| NPM version: $(npm --version) | |
| GitHub ref: ${{ github.ref }} | |
| GitHub head ref: ${{ github.head_ref }} | |
| EOF | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build scratch-vm for smalruby | |
| run: npm run setup-scratch-vm | |
| - name: Run Build | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4000 | |
| NODE_ENV: production | |
| GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| MESH_GRAPHQL_ENDPOINT: ${{ secrets.MESH_GRAPHQL_ENDPOINT }} | |
| MESH_API_KEY: ${{ secrets.MESH_API_KEY }} | |
| MESH_AWS_REGION: ${{ secrets.MESH_AWS_REGION }} | |
| run: npm run build | |
| - name: Store Build Output | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: build-output | |
| path: ./build | |
| - name: Store Dist Output | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: dist-output | |
| path: ./dist | |
| - name: Check installed browser | |
| if: | | |
| (!( | |
| github.ref == 'refs/heads/develop' || | |
| github.ref == 'refs/heads/master' || | |
| github.ref == 'refs/heads/main' | |
| )) | |
| run: | | |
| for F in chrome chromium chromedriver; do | |
| which $F && $F --version || echo Not found: $F | |
| done | |
| - name: Run Integration Tests | |
| if: | | |
| (!( | |
| github.ref == 'refs/heads/develop' || | |
| github.ref == 'refs/heads/master' || | |
| github.ref == 'refs/heads/main' | |
| )) | |
| env: | |
| JEST_JUNIT_OUTPUT_NAME: integration-results.xml | |
| JEST_JUNIT_OUTPUT_DIR: test-results/integration | |
| run: npm run test:integration -- --reporters="default" --reporters="jest-junit" | |
| - name: Store Test Results | |
| if: always() # Even if tests fail | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | |
| with: | |
| name: test-output-integration | |
| path: ./test-results/* | |
| - run: | | |
| if [[ ${{ contains(github.ref, 'hotfix') }} == 'true' ]]; then | |
| sed -e "s|hotfix/REPLACE|${{ github.ref_name }}|" --in-place release.config.js | |
| fi |