From 1d2117e2d311e86e22d8f84a88268fc943bf5f0d Mon Sep 17 00:00:00 2001 From: Alexander Gutkin Date: Mon, 9 Dec 2024 16:31:24 +0000 Subject: [PATCH] Cleanup CI action for Linux a bit. PiperOrigin-RevId: 704296894 --- .../{validate.yaml => test_linux.yaml} | 33 ++++++++++++------- README.md | 2 +- 2 files changed, 23 insertions(+), 12 deletions(-) rename .github/workflows/{validate.yaml => test_linux.yaml} (60%) diff --git a/.github/workflows/validate.yaml b/.github/workflows/test_linux.yaml similarity index 60% rename from .github/workflows/validate.yaml rename to .github/workflows/test_linux.yaml index bf19afb..39d2f38 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/test_linux.yaml @@ -12,29 +12,40 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Validate +name: Linux Tests on: [push, pull_request] +permissions: read-all + +# Prevent previous workflows from running. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + env: FORCE_COLOR: true jobs: test-linux: - name: Build Linux + name: Test Linux runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - submodules: true - - name: SetupAndTest + submodules: "recursive" + + - name: Create and start virtual environment run: | - export VIRTUAL_ENV=$(mktemp -d) - echo "Virtual environment: $VIRTUAL_ENV" - python -m venv "$VIRTUAL_ENV" - . $VIRTUAL_ENV/bin/activate - echo "Setting up ..." + python3 -m venv venv + source venv/bin/activate + + - name: Set up the packages + run: | + source venv/bin/activate ./setup.sh - echo "Testing ..." + + -name: Testing + run: | ./test.sh deactivate diff --git a/README.md b/README.md index c85e1d6..5106524 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ProtoScribe: Modeling the Evolution of Writing -![CI status](https://github.com/google-research/protoscribe/actions/workflows/validate.yaml/badge.svg?branch=main) +![CI status](https://github.com/google-research/protoscribe/actions/workflows/test_linux.yaml/badge.svg?branch=main)
𓏞