Skip to content
Snippets Groups Projects
Verified Commit 2ed91f1d authored by Rafael Epplée's avatar Rafael Epplée
Browse files

Download GraphQL schema in CI

parent d4d506e4
Branches fix-ci
No related tags found
No related merge requests found
image: "archlinux:latest"
before_script:
- pacman -Syu --needed --noconfirm rust gcc cargo-audit pkgconf
.default:
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
GITLAB_TOKEN: $CI_JOB_TOKEN
cache:
paths:
- cargo
before_script:
- pacman -Syu --needed --noconfirm rust gcc cargo-audit pkgconf just
- export PATH="$PATH:$CI_PROJECT_DIR/cargo/bin"
- cargo install graphql_client_cli
- just update-graphql-schema
stages:
- lint
......@@ -9,20 +19,24 @@ stages:
format:
stage: lint
extends: .default
script:
- cargo fmt --all -- --check
clippy:
stage: lint
extends: .default
script:
- cargo clippy --all -- -D warnings
- cargo clippy --all-targets -- -D warnings
audit:
extends: .default
stage: lint
script:
- cargo audit
test:
extends: .default
stage: test
script:
- cargo test --all --release
- cargo test --all-targets --release
......@@ -41,7 +41,7 @@ update-graphql-schema:
graphql-client introspect-schema https://gitlab.archlinux.org/api/graphql --authorization "$GITLAB_TOKEN" --output src/gitlab_schema.json
lint:
cargo clippy
cargo clippy --all-targets -- -D warnings
lint-fix:
cargo clippy --fix --allow-staged
\ No newline at end of file
cargo clippy --all-targets --fix --allow-staged -- -D warnings
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment