mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Merge pull request #2106 from MartinFournier/fix/ci
Split GitHub workflow into multiple jobs to get clearer results
This commit is contained in:
commit
91ac40efd0
74
.github/workflows/ci.yml
vendored
74
.github/workflows/ci.yml
vendored
@ -1,4 +1,3 @@
|
|||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -13,39 +12,44 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# The type of runner that the job will run on
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16.13.1]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
- uses: actions/checkout@v2
|
||||||
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
|
- name: Use Node.js 16.13.1
|
||||||
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
uses: actions/setup-node@v2
|
||||||
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
with:
|
||||||
- uses: actions/checkout@v2
|
node-version: 16.13.1
|
||||||
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
|
cache: 'npm'
|
||||||
- run: echo "The workflow is now ready to test your code on the runner."
|
- name: Install npm dependencies
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
run: npm ci
|
||||||
uses: actions/setup-node@v2
|
- name: Build the production app
|
||||||
with:
|
run: npm run build
|
||||||
node-version: ${{ matrix.node-version }}
|
lint:
|
||||||
- name: Install npm dependencies
|
name: Lint
|
||||||
run: npm ci
|
runs-on: ubuntu-latest
|
||||||
- name: Run unit tests
|
steps:
|
||||||
run: npm run test
|
- uses: actions/checkout@v2
|
||||||
- name: Run linter
|
- name: Use Node.js 16.13.1
|
||||||
run: npm run lint:report
|
uses: actions/setup-node@v2
|
||||||
- name: Build the web app
|
with:
|
||||||
run: npm run build
|
node-version: 16.13.1
|
||||||
|
cache: 'npm'
|
||||||
# Cannot build the electron app by default using ubuntu
|
- name: Install npm dependencies
|
||||||
# Wrapper command 'wine64' not found on the system. Consult your Linux distribution's package manager to determine how to install Wine.
|
run: npm ci
|
||||||
# - name: Build the electron app
|
- name: Run linter
|
||||||
# run: ./package.sh
|
run: npm run lint:report
|
||||||
|
test:
|
||||||
# Unable to properly run the cypress tests for now, they are throwing errors.
|
name: Test
|
||||||
# - name: Run the integration tests
|
runs-on: ubuntu-latest
|
||||||
# run: npm run cy:test
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js 16.13.1
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16.13.1
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run linter
|
||||||
|
run: npm run test
|
||||||
|
@ -819,7 +819,7 @@ export function NetscriptSingularity(
|
|||||||
|
|
||||||
return player.getUpgradeHomeRamCost();
|
return player.getUpgradeHomeRamCost();
|
||||||
},
|
},
|
||||||
workForCompany: function (companyName: any, focus: boolean = true): any {
|
workForCompany: function (companyName: any, focus = true): any {
|
||||||
helper.updateDynamicRam("workForCompany", getRamCost("workForCompany"));
|
helper.updateDynamicRam("workForCompany", getRamCost("workForCompany"));
|
||||||
helper.checkSingularityAccess("workForCompany", 2);
|
helper.checkSingularityAccess("workForCompany", 2);
|
||||||
|
|
||||||
@ -991,7 +991,7 @@ export function NetscriptSingularity(
|
|||||||
workerScript.log("joinFaction", () => `Joined the '${name}' faction.`);
|
workerScript.log("joinFaction", () => `Joined the '${name}' faction.`);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
workForFaction: function (name: any, type: any, focus: boolean = true): any {
|
workForFaction: function (name: any, type: any, focus = true): any {
|
||||||
helper.updateDynamicRam("workForFaction", getRamCost("workForFaction"));
|
helper.updateDynamicRam("workForFaction", getRamCost("workForFaction"));
|
||||||
helper.checkSingularityAccess("workForFaction", 2);
|
helper.checkSingularityAccess("workForFaction", 2);
|
||||||
getFaction("workForFaction", name);
|
getFaction("workForFaction", name);
|
||||||
|
@ -19,12 +19,12 @@ function isNs2(filename: string): boolean {
|
|||||||
|
|
||||||
const newNs2Template = `/** @param {NS} ns **/
|
const newNs2Template = `/** @param {NS} ns **/
|
||||||
export async function main(ns) {
|
export async function main(ns) {
|
||||||
|
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
export function commonEditor(
|
export function commonEditor(
|
||||||
command: string,
|
command: string,
|
||||||
{ terminal, router, player, server, args }: EditorParameters,
|
{ terminal, router, player, args }: EditorParameters,
|
||||||
scriptEditorRouteOptions?: ScriptEditorRouteOptions,
|
scriptEditorRouteOptions?: ScriptEditorRouteOptions,
|
||||||
): void {
|
): void {
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user