Skip to content

Commit

Permalink
copy tags
Browse files Browse the repository at this point in the history
  • Loading branch information
edmorley committed Mar 13, 2024
1 parent 926e474 commit ebf148b
Showing 1 changed file with 15 additions and 50 deletions.
65 changes: 15 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,25 @@
name: CI

on:
push:
# Avoid duplicate builds on PRs.
branches:
- main
pull_request:
on: [push, pull_request]

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Clippy
run: cargo clippy --all-targets --locked -- --deny warnings
- name: rustfmt
run: cargo fmt -- --check

unit-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Run unit tests
run: cargo test --locked

integration-test:
runs-on: ubuntu-22.04
copy-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install musl-tools
run: sudo apt-get install musl-tools --no-install-recommends
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install Pack CLI
uses: buildpacks/github-actions/[email protected]
- name: Run integration tests
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test --locked -- --ignored
- name: Login to Docker Hub
uses: docker/[email protected]
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Install crane
uses: buildpacks/github-actions/[email protected]
with:
crane-version: "0.19.0"
- name: Copy images
run: crane copy --all-tags docker.io/heroku/procfile-cnb docker.io/heroku/buildpack-procfile

0 comments on commit ebf148b

Please sign in to comment.