mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Merge pull request #188 from freqtrade/ci_test
Change CI to use official node installation
This commit is contained in:
commit
b6b455b900
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
|
@ -7,25 +7,56 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
release:
|
||||||
|
types: [ created ]
|
||||||
|
# types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-18.04]
|
os: [ ubuntu-20.04 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: npm install
|
- uses: actions/setup-node@v2-beta
|
||||||
uses: bahmutov/npm-install@v1
|
|
||||||
|
- run: yarn install
|
||||||
|
|
||||||
- name: Run Lint
|
- name: Run Lint
|
||||||
run: |
|
run: yarn lint-ci
|
||||||
yarn lint-ci
|
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: yarn test:unit
|
||||||
yarn test:unit
|
|
||||||
|
- name: Build build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Archive artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: FreqUI
|
||||||
|
path: |
|
||||||
|
dist
|
||||||
|
!dist/**/*.map
|
||||||
|
retention-days: 10
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: [ build ]
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: FreqUI
|
||||||
|
path: ./
|
||||||
|
|
||||||
|
- name: Upload release binaries
|
||||||
|
uses: alexellis/upload-assets@0.2.2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
asset_paths: '["FreqUI.zip"]'
|
||||||
|
|
|
@ -139,7 +139,6 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (themeName.toLowerCase() === 'bootstrap') {
|
if (themeName.toLowerCase() === 'bootstrap') {
|
||||||
console.log('bootstrap');
|
|
||||||
const styles = document.getElementsByTagName('style');
|
const styles = document.getElementsByTagName('style');
|
||||||
const bw = Array.from(styles).filter((w) => w.textContent.includes('bootswatch'));
|
const bw = Array.from(styles).filter((w) => w.textContent.includes('bootswatch'));
|
||||||
// Reset all bootswatch styles
|
// Reset all bootswatch styles
|
||||||
|
@ -166,7 +165,6 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Save the theme as localstorage
|
// Save the theme as localstorage
|
||||||
console.log('Setting theme as', themeName);
|
|
||||||
window.localStorage.theme = themeName;
|
window.localStorage.theme = themeName;
|
||||||
this.activeTheme = themeName;
|
this.activeTheme = themeName;
|
||||||
},
|
},
|
||||||
|
@ -187,7 +185,7 @@ export default {
|
||||||
// );
|
// );
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -131,7 +131,6 @@ export default class Login extends Vue {
|
||||||
userService
|
userService
|
||||||
.login(this.auth)
|
.login(this.auth)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('Login success.');
|
|
||||||
this.setLoggedIn(true);
|
this.setLoggedIn(true);
|
||||||
setBaseUrl(userService.getAPIUrl());
|
setBaseUrl(userService.getAPIUrl());
|
||||||
this.emitLoginResult(true);
|
this.emitLoginResult(true);
|
||||||
|
@ -141,7 +140,6 @@ export default class Login extends Vue {
|
||||||
if (resolved.route.name !== '404') {
|
if (resolved.route.name !== '404') {
|
||||||
this.$router.push(resolved.route.path);
|
this.$router.push(resolved.route.path);
|
||||||
} else {
|
} else {
|
||||||
console.log('Invalid redirect detected. Redirecting to home.');
|
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -152,7 +150,7 @@ export default class Login extends Vue {
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.errorMessageCORS = false;
|
this.errorMessageCORS = false;
|
||||||
// this.nameState = false;
|
// this.nameState = false;
|
||||||
console.log(error.response);
|
console.error(error.response);
|
||||||
if (error.response && error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
this.nameState = false;
|
this.nameState = false;
|
||||||
this.errorMessage = 'Connected to bot, however Login failed, Username or Password wrong.';
|
this.errorMessage = 'Connected to bot, however Login failed, Username or Password wrong.';
|
||||||
|
@ -165,7 +163,7 @@ You can verify this by navigating to ${this.auth.url}/api/v1/ping to make sure t
|
||||||
this.errorMessageCORS = true;
|
this.errorMessageCORS = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.errorMessage);
|
console.error(this.errorMessage);
|
||||||
this.emitLoginResult(false);
|
this.emitLoginResult(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user