Skip to content

Refactored type system #781

Refactored type system

Refactored type system #781

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
analyze:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '>=1.19'
- name: Set up linters
run: make install-tools
- name: Lint
run: |
make vet
make lint
make fmt
git diff
if [[ $(git diff) != '' ]]; then echo 'Invalid formatting!' >&2; exit 1; fi
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
goVer: [1.18, 1.19]
steps:
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goVer }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up ANTLR
env:
ANTLR_VERSION: 4.11.1
run: |
sudo curl -o /usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar
export CLASSPATH=".:/usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar:$CLASSPATH"
mkdir $HOME/antlr-bin
echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.11.1-complete.jar "$@"' > $HOME/antlr-bin/antlr
echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/antlr-bin/grun
chmod +x $HOME/antlr-bin/*
export PATH=$PATH:$HOME/antlr-bin
antlr
- name: Set up Lab
run: |
curl https://raw.githubusercontent.com/MontFerret/lab/master/install.sh -o install.sh
chmod +x ./install.sh
LOCATION=$PWD ./install.sh
- name: Get dependencies
run: make install
- name: Generate
run: |
export PATH=$PATH:$HOME/antlr-bin
make generate
- name: Compile
run: make compile
- name: Unit tests
run: make cover
- name: E2E tests
run: |
docker run -d -p 9222:9222 ghcr.io/montferret/chromium:92.0.4512.0
LAB_BIN=$PWD/lab make e2e
docker stop $(docker ps -q)