fix: use forgejo action mirrors, add pre-build compile and clippy checks
This commit is contained in:
parent
2af49f2ae4
commit
39f899ce2e
3 changed files with 29 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Generate image tag
|
||||
id: tag
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Generate image tag
|
||||
id: tag
|
||||
|
|
@ -33,6 +33,17 @@ jobs:
|
|||
TAG="main-${TIMESTAMP}-${SHORT_SHA}"
|
||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run clippy and tests
|
||||
working-directory: rust/prop_grid_rs
|
||||
run: |
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
cargo test --release
|
||||
|
||||
- name: Build and push via Kaniko
|
||||
uses: graham/infra/.forgejo/actions/kaniko-build@main
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Generate image tag
|
||||
id: tag
|
||||
|
|
@ -30,6 +30,21 @@ jobs:
|
|||
TAG="main-${TIMESTAMP}-${SHORT_SHA}"
|
||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Verify compilation
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}:/app \
|
||||
-w /app \
|
||||
-e MIX_ENV=prod \
|
||||
docker.io/hexpm/elixir:1.20.1-erlang-29.0.2-debian-trixie-20260518-slim \
|
||||
sh -c '\
|
||||
mix local.hex --force && \
|
||||
mix local.rebar --force && \
|
||||
mix deps.get --only prod && \
|
||||
mix deps.compile && \
|
||||
mix assets.setup && \
|
||||
mix compile --warnings-as-errors'
|
||||
|
||||
- name: Build and Push via Kaniko
|
||||
uses: graham/infra/.forgejo/actions/kaniko-build@main
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue