Skip to content

Fixed macro typing

Fixed macro typing #52

Workflow file for this run

# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to set up your CI with Pants.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# permissions:
# contents: write
# packages: write
env:
PANTS_CONFIG_FILES: pants.ci.toml
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
# Need to use this action to specify containerd, otherwise it won't cache
- uses: crazy-max/ghaction-setup-docker@v3
with:
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
# This seems to be optional - if you're not doing cross-arch compilation of the container content
# - uses: docker/setup-buildx-action@v3
# with:
# install: true
# driver: docker
- name: Set up environment variables for Pants (Docker) to use GHA Cache
uses: actions/github-script@v7
with:
script: |
core.exportVariable("ACTIONS_CACHE_URL", process.env.ACTIONS_CACHE_URL || "");
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || "");
- name: Log in to the Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: pantsbuild/actions/init-pants@v9
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }}
- name: Emit GH env vars
run: |
echo "Event name: ${{ github.event_name }}"
echo "Base ref: ${{ github.base_ref }}"
echo "Head ref: ${{ github.head_ref }}"
echo "Ref: ${{ github.ref }}"
echo "Ref name: ${{ github.ref_name }}"
echo "Repo: ${{ github.repository }}"
echo "Owner: ${{ github.repository_owner }}"
echo "Actor: ${{ github.actor }}"
echo "Triggering Actor: ${{ github.triggering_actor }}"
- name: Bootstrap Pants
run: |
pants --version
- name: Lint
run: |
pants update-build-files --check lint ::
- name: Package
run: |
pants --docker-build-verbose package ::
# - name: Upload pants log
# uses: actions/upload-artifact@v2
# with:
# name: pants-log
# path: .pants.d/pants.log
# if: always() # We want the log even on failures.