This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
smallc hagne #56
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: MojoCodeTest | |
env: | |
MOJO_HOME: /home/runner/.modular/pkg/packages.modular.com_mojo/bin | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v4 | |
with: | |
path: /home/runner/.modular | |
key: ${{ runner.os }}-modular-${{ hashFiles('**/modular.lock') }} | |
restore-keys: | | |
${{ runner.os }}-modular- | |
- name: Download and Install Mojo | |
run: | | |
curl https://get.modular.com | sh - && | |
modular auth ${{ secrets.MOJO_TOKEN }} | |
modular install mojo | |
- name: Run Mojo and Check for Errors | |
run: | | |
${{ env.MOJO_HOME }}/mojo ${{ vars.TEST_FILE }} |