diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 933a5eea..dfb02d4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,28 +23,42 @@ jobs: node-version: '16.x' - name: ๐Ÿšง Install Node dependencies - run: cd frontend && npm ci + run: | + cd frontend + npm ci - name: ๐Ÿ”ผ Update Rust to latest stable - run: rustc --version && rustup update stable && rustc --version - - - name: ๐Ÿ“ฆ Install cargo-about - run: cargo install cargo-about + run: | + rustc --version + rustup update stable + rustc --version - name: ๐ŸŒ Build Graphite web code - run: cd frontend && npm run build + env: + NODE_ENV: production + SKIP_CARGO_ABOUT: true + run: | + cd frontend + npm run build - name: ๐Ÿ‘• Lint Graphite web formatting - run: export NODE_ENV=production && cd frontend && npm run lint + env: + NODE_ENV: production + run: | + cd frontend + npm run lint - name: ๐Ÿ”ฌ Check Rust formatting - run: cargo fmt --all -- --check + run: | + cargo fmt --all -- --check - name: ๐Ÿฆ€ Build Rust code - run: cargo build --verbose + run: | + cargo build --verbose - name: ๐Ÿงช Run Rust tests - run: cargo test --verbose + run: | + cargo test --verbose cargo-deny: runs-on: ubuntu-latest diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index 12285f52..ddb75728 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -59,8 +59,8 @@ module.exports = { "linebreak-style": ["error", "unix"], "eol-last": ["error", "always"], "max-len": ["error", { code: 200, tabWidth: 4 }], - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-console": "warn", + "no-debugger": "warn", "no-param-reassign": ["error", { props: false }], "no-bitwise": "off", "no-shadow": "off", diff --git a/frontend/vue.config.js b/frontend/vue.config.js index 702c3588..d7f5fb2e 100644 --- a/frontend/vue.config.js +++ b/frontend/vue.config.js @@ -105,7 +105,7 @@ module.exports = { function formatThirdPartyLicenses(jsLicenses) { let rustLicenses = null; - if (process.env.NODE_ENV === "production") { + if (process.env.NODE_ENV === "production" && process.env.SKIP_CARGO_ABOUT === undefined) { try { rustLicenses = generateRustLicenses(); } catch (e) {