Skip to content

Merged branch 'feature/fields' into 'feature/Quatsch'. #485

Merged branch 'feature/fields' into 'feature/Quatsch'.

Merged branch 'feature/fields' into 'feature/Quatsch'. #485

Workflow file for this run

name: Test
on: ["push", "pull_request"]
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install npm dependencies
run: npm install
- name: Run linter
run: npm run lint
standardLibraryPreparation:
name: Standard Library Preparation
runs-on: ubuntu-latest
steps:
- name: Clone standard library
uses: actions/checkout@v3
with:
repository: "PhosphorLang/PhosphorStandardLibrary"
- name: Install standard library dependencies
run: sudo apt-get -yqq install nasm gcc binutils binutils-avr
- name: Build standard library
run: bash build.sh all
- name: Upload standard library build as artifact
uses: actions/upload-artifact@v4
with:
name: "StandardLibrary"
path: "bin/"
testing:
name: Running tests
needs: [standardLibraryPreparation]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18.x, 20.x]
experimental: [false]
include:
- os: ubuntu-latest
node: 19.x
experimental: true
- os: ubuntu-latest
node: 21.x
experimental: true
- os: windows-latest
node: 20.x
experimental: true
- os: macos-latest
node: 20.x
experimental: true
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
path: "Compiler"
- name: Download standard library artifact
uses: actions/download-artifact@v4
with:
name: "StandardLibrary"
path: "StandardLibrary/bin/"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install system dependencies
if: runner.os == 'Linux'
run: sudo apt-get -yqq install llvm-14 binutils
- name: Install npm dependencies
working-directory: "Compiler"
run: npm install
- name: Run tests
working-directory: "Compiler"
run: npm test
coverage:
name: Coverage with Coveralls
needs: [standardLibraryPreparation]
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
path: "Compiler"
- name: Download standard library artifact
uses: actions/download-artifact@v4
with:
name: "StandardLibrary"
path: "StandardLibrary/bin/"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install system dependencies
if: runner.os == 'Linux'
run: sudo apt-get -yqq install llvm-14 binutils
- name: Install npm dependencies
working-directory: "Compiler"
run: npm install
- name: Run coverage
working-directory: "Compiler"
run: npm run coverage:coveralls
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
base-path: "Compiler"
github-token: ${{ secrets.GITHUB_TOKEN }}