feat (cli): Classpath Duplicate Detection Test #474
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
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# Copyright 2023 The Enola <https://enola.dev> Authors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [main] | |
# Cancel any in-progress job or run if there is a newer commit | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
if: github.repository == 'enola-dev/enola' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
# https://github.com/actions/cache/pull/575/files | |
path: | | |
~/.cache/bazel/ | |
~/.cache/bazelisk/ | |
/private/var/tmp/_bazel_runner/ | |
key: > | |
${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bazel', 'MODULE.bazel') }} | |
restore-keys: ${{ runner.os }}-bazel- | |
- name: Cache Python | |
uses: actions/cache@v3 | |
with: | |
path: .venv/ | |
key: ${{ runner.os }}-venv-${{ hashFiles('requirements.txt') }} | |
restore-keys: ${{ runner.os }}-venv- | |
- name: Cache Node.js | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
# -${{ hashFiles('**/package-lock.json') }} | |
key: ${{ runner.os }}-npm | |
restore-keys: ${{ runner.os }}-npm | |
- name: Cache Pre-Commit | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: ${{ runner.os }}-cache-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: ${{ runner.os }}-cache- | |
- name: Cache Demo | |
uses: actions/cache@v3 | |
with: | |
path: .cache/demo/ | |
key: ${{ runner.os }}-demo-${{ hashFiles('tools/demo/*.bash') }} | |
restore-keys: ${{ runner.os }}-demo- | |
- run: ./test.bash | |
# Build docs/ into site/ (not just on main branch but also for pull requests, as test) | |
- name: Build Docs Site | |
run: ./tools/docs/build.bash | |
# The following steps deploy site/ (using GitHub Pages) | |
# to https://enola-dev.github.io = https://docs.enola.dev | |
- name: Setup Pages | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/configure-pages@v3 | |
- name: Upload site/ directory as GitHub Pages artifact | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "site/" | |
deploy: | |
needs: build | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
# Sets required permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# https://github.com/actions/deploy-pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |