Skip to content

build: add typechecking to instruments and modules #20432

build: add typechecking to instruments and modules

build: add typechecking to instruments and modules #20432

Workflow file for this run

name: PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
lint:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: install
run: ./scripts/dev-env/run.sh ./scripts/setup.sh
- name: npm run lint
run: ./scripts/dev-env/run.sh npm run lint
- name: lint-rust.sh
run: |
./scripts/dev-env/run.sh scripts/lint-rust.sh
test-rust:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: test-rust.sh
run: |
./scripts/dev-env/run.sh scripts/test-rust.sh
test-js:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: npm install
run: ./scripts/dev-env/run.sh ./scripts/setup.sh
- name: npm test
run: npm test
build:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Create .env file
run: |
echo A32NX_PRODUCTION_BUILD=1 >> fbw-a32nx/.env
echo FBW_TYPECHECK=1 >> fbw-a32nx/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> fbw-a32nx/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> fbw-a32nx/.env
echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a32nx/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a32nx/.env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
cat fbw-a32nx/.env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
rm -rf fbw-a32nx/src
- name: Generate install.json
if: github.event.pull_request.auto_merge == false
run: |
df -h
./scripts/dev-env/run.sh node ./scripts/fragment_a32nx.js
cp ./fbw-a32nx/out/build-modules/modules.json ./fbw-a32nx/out/flybywire-aircraft-a320-neo/install.json
./scripts/dev-env/run.sh node ./scripts/install-source_a32nx.js
- name: Upload PR artifact
uses: actions/upload-artifact@v2
if: github.event.pull_request.auto_merge == false
with:
name: A32NX
path: ./fbw-a32nx/out/flybywire-aircraft-a320-neo/